From 10eec627bab98eb1a04c333f6cc9594e81a6b49a Mon Sep 17 00:00:00 2001 From: Angie Byron <webchick@24967.no-reply.drupal.org> Date: Thu, 29 Apr 2010 05:19:50 +0000 Subject: [PATCH] #655736 by David_Rothstein: De-couple Dashboard and Toolbar modules from Overlay. --- modules/dashboard/dashboard.module | 7 ++++--- modules/toolbar/toolbar.module | 11 +++++++---- 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/modules/dashboard/dashboard.module b/modules/dashboard/dashboard.module index 75d434cbeca0..2bde008a9c3e 100644 --- a/modules/dashboard/dashboard.module +++ b/modules/dashboard/dashboard.module @@ -161,9 +161,10 @@ function dashboard_page_build(&$page) { function dashboard_system_info_alter(&$info, $file, $type) { if ($type == 'theme') { $info['regions'] += dashboard_region_descriptions(); - if (module_exists('overlay')) { - $info['overlay_regions'] = !empty($info['overlay_regions']) ? array_merge($info['overlay_regions'], dashboard_regions()) : dashboard_regions(); - } + // Indicate that these regions are intended to be displayed whenever the + // dashboard is displayed in an overlay. This information is provided for + // any module that might need to use it, not just the core Overlay module. + $info['overlay_regions'] = !empty($info['overlay_regions']) ? array_merge($info['overlay_regions'], dashboard_regions()) : dashboard_regions(); } } diff --git a/modules/toolbar/toolbar.module b/modules/toolbar/toolbar.module index 7c82d09a5165..c245a8fa7f1c 100644 --- a/modules/toolbar/toolbar.module +++ b/modules/toolbar/toolbar.module @@ -153,12 +153,15 @@ function toolbar_preprocess_html(&$vars) { /** * Implements hook_system_info_alter(). * - * If the overlay module is enabled, indicate that the 'page_top' region (in - * which the toolbar will be displayed) is one of the overlay supplemental - * regions that should be refreshed whenever its content is updated. + * Indicate that the 'page_top' region (in which the toolbar will be displayed) + * is an overlay supplemental region that should be refreshed whenever its + * content is updated. + * + * This information is provided for any module that might need to use it, not + * just the core Overlay module. */ function toolbar_system_info_alter(&$info, $file, $type) { - if (module_exists('overlay') && $type == 'theme') { + if ($type == 'theme') { $info['overlay_supplemental_regions'][] = 'page_top'; } } -- GitLab