diff --git a/includes/theme.inc b/includes/theme.inc index a4b0b1274bbb79d0d2c336e8001cd92c8acc17f3..d9f8a5de63ba9fe717353ac3c23054bbd221251d 100644 --- a/includes/theme.inc +++ b/includes/theme.inc @@ -43,7 +43,7 @@ function init_theme() { // 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]->status ? $custom_theme : $theme; + $theme = $custom_theme && $themes[$custom_theme] ? $custom_theme : $theme; // Store the identifier for retrieving theme settings with. $theme_key = $theme; diff --git a/modules/system.module b/modules/system.module index 5508f868d455efaee905702246e9b18d32588c99..a2ec2f332b9787408f702cee26cc3ff053fc7107 100644 --- a/modules/system.module +++ b/modules/system.module @@ -113,7 +113,16 @@ function system_menu() { */ function system_user($type, $edit, &$user, $category = NULL) { if ($type == 'form' && $category == 'account') { - if (count($themes = list_themes()) > 1) { + $allthemes = list_themes(); + + // list only active themes + foreach ($allthemes as $key => $theme) { + if ($theme->status) { + $themes[$key] = $theme; + } + } + + if (count($themes) > 1) { $rows = array(); foreach ($themes as $key => $value) { $row = array(); diff --git a/modules/system/system.module b/modules/system/system.module index 5508f868d455efaee905702246e9b18d32588c99..a2ec2f332b9787408f702cee26cc3ff053fc7107 100644 --- a/modules/system/system.module +++ b/modules/system/system.module @@ -113,7 +113,16 @@ function system_menu() { */ function system_user($type, $edit, &$user, $category = NULL) { if ($type == 'form' && $category == 'account') { - if (count($themes = list_themes()) > 1) { + $allthemes = list_themes(); + + // list only active themes + foreach ($allthemes as $key => $theme) { + if ($theme->status) { + $themes[$key] = $theme; + } + } + + if (count($themes) > 1) { $rows = array(); foreach ($themes as $key => $value) { $row = array();