diff options
author | Dries Buytaert <dries@buytaert.net> | 2004-08-21 10:16:13 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2004-08-21 10:16:13 +0000 |
commit | 03fa966c1f6de932d85ad77f91a288698620f031 (patch) | |
tree | 165e8afa4453125a76128891889a1b56fc888362 | |
parent | ab616a560a393b28583805577e7d0f2cda5e9807 (diff) | |
download | brdo-03fa966c1f6de932d85ad77f91a288698620f031.tar.gz brdo-03fa966c1f6de932d85ad77f91a288698620f031.tar.bz2 |
- Patch #9576 by TDobes: bugfix: fixed bug in recent theme system changes.
-rw-r--r-- | includes/theme.inc | 6 | ||||
-rw-r--r-- | modules/system.module | 2 | ||||
-rw-r--r-- | modules/system/system.module | 2 |
3 files changed, 5 insertions, 5 deletions
diff --git a/includes/theme.inc b/includes/theme.inc index 7c87fcee9..a8790ea67 100644 --- a/includes/theme.inc +++ b/includes/theme.inc @@ -39,11 +39,11 @@ function init_theme() { // Only select the user selected theme if it is available in the // list of enabled themes. - $theme = $user->theme && $themes[$user->theme] ? $user->theme : variable_get('theme_default', 'bluemarine'); + $theme = $user->theme && $themes[$user->theme]->status ? $user->theme : variable_get('theme_default', 'bluemarine'); // Allow modules to override the present theme... only select custom theme // if it is available in the list of enabled themes. - $theme = $custom_theme && $themes[$custom_theme] ? $custom_theme : $theme; + $theme = $custom_theme && $themes[$custom_theme]->status ? $custom_theme : $theme; // Store the identifier for retrieving theme settings with. $theme_key = $theme; @@ -99,7 +99,7 @@ function list_themes($refresh = FALSE) { if (!$list) { $list = array(); - $result = db_query("SELECT * FROM {system} where type = 'theme' AND status = '1' ORDER BY name"); + $result = db_query("SELECT * FROM {system} WHERE type = 'theme' ORDER BY name"); while ($theme = db_fetch_object($result)) { if (file_exists($theme->filename)) { $list[$theme->name] = $theme; diff --git a/modules/system.module b/modules/system.module index 96d2b14cf..5508f868d 100644 --- a/modules/system.module +++ b/modules/system.module @@ -633,7 +633,7 @@ function system_theme_settings() { $function = $themes[$key]->prefix .'_settings'; if (function_exists($function)) { $group = $function(); - if (strpos($themes[$key]->description, '.theme')) { + if (strpos($themes[$key]->description, '.theme') || ($themes[$key]->description == '')) { $form .= form_group(t('Theme-specific settings'), $group, t('These settings only exist for the %theme theme and all the styles based on it.', array('%theme' => $themes[$key]->prefix))); } else { diff --git a/modules/system/system.module b/modules/system/system.module index 96d2b14cf..5508f868d 100644 --- a/modules/system/system.module +++ b/modules/system/system.module @@ -633,7 +633,7 @@ function system_theme_settings() { $function = $themes[$key]->prefix .'_settings'; if (function_exists($function)) { $group = $function(); - if (strpos($themes[$key]->description, '.theme')) { + if (strpos($themes[$key]->description, '.theme') || ($themes[$key]->description == '')) { $form .= form_group(t('Theme-specific settings'), $group, t('These settings only exist for the %theme theme and all the styles based on it.', array('%theme' => $themes[$key]->prefix))); } else { |