Commit 00bbd7da authored by Dries's avatar Dries
Browse files

- Patch #658118 by David_Rothstein, carlos8f: overlay prevented enabling of...

- Patch #658118 by David_Rothstein, carlos8f: overlay prevented enabling of other modules at the same time.
parent 4837645a
......@@ -14,6 +14,7 @@
*/
function overlay_enable() {
if (strpos(current_path(), 'admin/modules') === 0) {
drupal_goto('<front>', array('fragment' => 'overlay=admin/modules'));
// Flag for a redirect to <front>#overlay=admin/modules on hook_init().
$_SESSION['overlay_enable_redirect'] = 1;
}
}
......@@ -59,6 +59,13 @@ function overlay_init() {
// Only act if the user has access to administration pages. Other modules can
// also enable the overlay directly for other uses of the JavaScript.
if (user_access('access overlay')) {
// After overlay is enabled on the modules page, redirect to
// <front>#overlay=admin/modules to actually enable the overlay.
if (isset($_SESSION['overlay_enable_redirect']) && $_SESSION['overlay_enable_redirect']) {
unset($_SESSION['overlay_enable_redirect']);
drupal_goto('<front>', array('fragment' => 'overlay=' . current_path()));
}
if (isset($_GET['render']) && $_GET['render'] == 'overlay') {
// If this page shouldn't be rendered here, redirect to the parent.
if (!path_is_admin($_GET['q'])) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment