function overlay_drupal_goto_alter
overlay_drupal_goto_alter(&$path, &$options, &$http_response_code)
Implements hook_drupal_goto_alter().
File
- modules/overlay/overlay.module, line 255
- Displays the Drupal administration interface in an overlay.
Code
function overlay_drupal_goto_alter(&$path, &$options, &$http_response_code) { if (overlay_get_mode() == 'child') { // The authorize.php script bootstraps Drupal to a very low level, where // the PHP code that is necessary to close the overlay properly will not be // loaded. Therefore, if we are redirecting to authorize.php inside the // overlay, instead redirect back to the current page with instructions to // close the overlay there before redirecting to the final destination; see // overlay_init(). if ($path == system_authorized_get_url() || $path == system_authorized_batch_processing_url()) { $_SESSION['overlay_close_dialog'] = array($path, $options); $path = current_path(); $options = drupal_get_query_parameters(); } // If the current page request is inside the overlay, add ?render=overlay // to the new path, so that it appears correctly inside the overlay. if (isset($options['query'])) { $options['query'] += array('render' => 'overlay'); } else { $options['query'] = array('render' => 'overlay'); } } }
© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/modules!overlay!overlay.module/function/overlay_drupal_goto_alter/7.x