- Patch #134161 by chx: no menu tabs for themes.

6.x
Dries Buytaert 2007-04-06 14:31:51 +00:00
parent ec3c0716aa
commit b0676cf351
2 changed files with 4 additions and 3 deletions

View File

@ -199,13 +199,13 @@ function _theme_build_registry($theme, $theme_engine) {
* An array of the currently available themes. * An array of the currently available themes.
*/ */
function list_themes($refresh = FALSE) { function list_themes($refresh = FALSE) {
static $list; static $list = array();
if ($refresh) { if ($refresh) {
unset($list); $list = array();
} }
if (!$list) { if (empty($list)) {
$list = array(); $list = array();
$result = db_query("SELECT * FROM {system} WHERE type = 'theme'"); $result = db_query("SELECT * FROM {system} WHERE type = 'theme'");
while ($theme = db_fetch_object($result)) { while ($theme = db_fetch_object($result)) {

View File

@ -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'"); db_query("UPDATE {system} SET status = 1 WHERE type = 'theme' AND name = 'garland'");
} }
list_themes(TRUE);
menu_rebuild(); menu_rebuild();
drupal_set_message(t('The configuration options have been saved.')); drupal_set_message(t('The configuration options have been saved.'));
return 'admin/build/themes'; return 'admin/build/themes';