Commit 15343a99 authored by Dries's avatar Dries

- Patch #591758 by catch: system_region_list() should use list_themes()...

- Patch #591758 by catch: system_region_list() should use list_themes() instead of a direct db_query().
parent 57090c33
......@@ -2136,7 +2136,8 @@ function system_region_list($theme_key, $show = REGIONS_ALL) {
$list = &drupal_static(__FUNCTION__, array());
if (empty($list[$theme_key][$show])) {
$info = unserialize(db_query("SELECT info FROM {system} WHERE type = :type AND name = :name", array(':type' => 'theme', ':name' => $theme_key))->fetchField());
$themes = list_themes();
$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'])) {
......
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