diff options
author | Dries Buytaert <dries@buytaert.net> | 2007-04-06 14:31:51 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2007-04-06 14:31:51 +0000 |
commit | b0676cf351ccb48e7d2cf1d93d5728f3e834886a (patch) | |
tree | 2b3c85ef24bd34fa0e3d0f91b657ebb43d0d525c | |
parent | ec3c0716aa39acc91fe75ce592ce77bdfdd2eb56 (diff) | |
download | brdo-b0676cf351ccb48e7d2cf1d93d5728f3e834886a.tar.gz brdo-b0676cf351ccb48e7d2cf1d93d5728f3e834886a.tar.bz2 |
- Patch #134161 by chx: no menu tabs for themes.
-rw-r--r-- | includes/theme.inc | 6 | ||||
-rw-r--r-- | modules/system/system.module | 1 |
2 files changed, 4 insertions, 3 deletions
diff --git a/includes/theme.inc b/includes/theme.inc index 762885f86..6e2a69c2e 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 d4266b62f..2df59c8c9 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'; |