diff options
author | Angie Byron <webchick@24967.no-reply.drupal.org> | 2010-10-01 18:37:23 +0000 |
---|---|---|
committer | Angie Byron <webchick@24967.no-reply.drupal.org> | 2010-10-01 18:37:23 +0000 |
commit | bf751d9a94dca1b48f30a061aa09049c977fbda1 (patch) | |
tree | 511a51fe8ae9f7675e5ea148ada52cc74e9f0d15 /modules/system/system.module | |
parent | 0223bf1dc25a77671618733ee7e76fba958013d8 (diff) | |
download | brdo-bf751d9a94dca1b48f30a061aa09049c977fbda1.tar.gz brdo-bf751d9a94dca1b48f30a061aa09049c977fbda1.tar.bz2 |
#651086 follow-up by carols8f: Fix cache clearing is an ineffective mess.
Diffstat (limited to 'modules/system/system.module')
-rw-r--r-- | modules/system/system.module | 26 |
1 files changed, 12 insertions, 14 deletions
diff --git a/modules/system/system.module b/modules/system/system.module index ce555c927..815383bcb 100644 --- a/modules/system/system.module +++ b/modules/system/system.module @@ -2601,23 +2601,21 @@ function system_find_base_themes($themes, $key, $used_keys = array()) { * An array of regions in the form $region['name'] = 'description'. */ function system_region_list($theme_key, $show = REGIONS_ALL) { - $list = &drupal_static(__FUNCTION__, array()); + $themes = list_themes(); + if (!isset($themes[$theme_key])) { + return array(); + } - if (empty($list[$theme_key][$show])) { - $themes = list_themes(); - if (!isset($themes[$theme_key])) { - $list[$theme_key][$show] = array(); - return $list[$theme_key][$show]; - } - $info = $themes[$theme_key]->info; - // If requested, suppress hidden regions. See block_admin_display_form(). - foreach ($info['regions'] as $name => $label) { - if ($show == REGIONS_ALL || !isset($info['regions_hidden']) || !in_array($name, $info['regions_hidden'])) { - $list[$theme_key][$show][$name] = $label; - } + $list = array(); + $info = $themes[$theme_key]->info; + // If requested, suppress hidden regions. See block_admin_display_form(). + foreach ($info['regions'] as $name => $label) { + if ($show == REGIONS_ALL || !isset($info['regions_hidden']) || !in_array($name, $info['regions_hidden'])) { + $list[$name] = $label; } } - return $list[$theme_key][$show]; + + return $list; } /** |