From b0676cf351ccb48e7d2cf1d93d5728f3e834886a Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Fri, 6 Apr 2007 14:31:51 +0000 Subject: [PATCH] - Patch #134161 by chx: no menu tabs for themes. --- includes/theme.inc | 6 +++--- modules/system/system.module | 1 + 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/includes/theme.inc b/includes/theme.inc index 762885f86d5..6e2a69c2e60 100644 --- a/includes/theme.inc +++ b/includes/theme.inc @@ -199,13 +199,13 @@ function _theme_build_registry($theme, $theme_engine) { * An array of the currently available themes. */ function list_themes($refresh = FALSE) { - static $list; + static $list = array(); if ($refresh) { - unset($list); + $list = array(); } - if (!$list) { + if (empty($list)) { $list = array(); $result = db_query("SELECT * FROM {system} WHERE type = 'theme'"); while ($theme = db_fetch_object($result)) { diff --git a/modules/system/system.module b/modules/system/system.module index d4266b62f97..2df59c8c9e2 100644 --- a/modules/system/system.module +++ b/modules/system/system.module @@ -1258,6 +1258,7 @@ function system_themes_form_submit($form_id, $form_values) { db_query("UPDATE {system} SET status = 1 WHERE type = 'theme' AND name = 'garland'"); } + list_themes(TRUE); menu_rebuild(); drupal_set_message(t('The configuration options have been saved.')); return 'admin/build/themes';