function modal_set_path_data in Modal operations 7
Fixes superglobal arrays.
Parameters
string $path: Drupal path of normal (non-modal) action.
7 calls to modal_set_path_data()
- modal_entityform_page_edit in modal_entityform/
modal_entityform.module - Modal Entityform edit page callback.
- modal_entityform_page_submit in modal_entityform/
modal_entityform.module - Modal Entityform add page callback.
- modal_node_edit_page_add in modal_node_edit/
modal_node_edit.module - Page callback - modal: add node.
- modal_node_edit_page_delete in modal_node_edit/
modal_node_edit.module - Page callback - modal: delete node.
- modal_node_edit_page_edit in modal_node_edit/
modal_node_edit.module - Page callback - modal: edit node.
File
- ./
modal.module, line 20
Code
function modal_set_path_data($path) {
// Set 'q' parameter in order to make arg() work correctly.
$_GET['q'] = $path;
$_REQUEST['q'] = $path;
// // This is disabled, since it breaks form action paths.
// // Set $_SERVER variables in order to make request_uri() work correctly.
// if (isset($_SERVER['REQUEST_URI'])) {
// $_SERVER['REQUEST_URI'] = base_path() . $path;
// }
// elseif (isset($_SERVER['SCRIPT_NAME'])) {
// $_SERVER['SCRIPT_NAME'] = base_path() . $path;
// }
}