function _flagging_dialog_set_drupal_path in Flagging Form 7
Same name and namespace in other branches
- 7.3 flagging_dialog.module \_flagging_dialog_set_drupal_path()
Fool the system to think the current URL is $path.
Used for "internal" redirections. This doesn't need to be foolproof: just enough to handle our own code.
1 call to _flagging_dialog_set_drupal_path()
- flagging_dialog_process_form_result in ./
flagging_dialog.module - Handles submission of the form.
File
- ./
flagging_dialog.module, line 269 - Provides menu callbacks for displaying the flagging forms in a dialog box.
Code
function _flagging_dialog_set_drupal_path($path) {
// Used by our form_alter():
$_GET['q'] = $path;
// Used as the action='...' for <form> tags:
$_SERVER['REQUEST_URI'] = url($path);
drupal_static_reset('element_info');
}