diff --git a/modules/system/system.admin.inc b/modules/system/system.admin.inc index 415158ef17519def8e593434f14f0ca037188bcb..5f98fa3c2c18ab16f14e0b95ff47e7f63906701d 100644 --- a/modules/system/system.admin.inc +++ b/modules/system/system.admin.inc @@ -191,35 +191,21 @@ function system_settings_overview() { return $output; } -/** - * Retrieve the list of themes that are not hidden. - */ -function _system_theme_list() { - // Get current list of themes. - $themes = system_rebuild_theme_data(); - - // Remove hidden themes from the display list. - foreach ($themes as $theme_key => $theme) { - if (!empty($theme->info['hidden'])) { - unset($themes[$theme_key]); - } - } - - uasort($themes, 'system_sort_modules_by_info_name'); - return $themes; -} - /** * Menu callback; displays a listing of all themes. */ function system_themes_page() { // Get current list of themes. - $themes = _system_theme_list(); + $themes = list_themes(); + uasort($themes, 'system_sort_modules_by_info_name'); $theme_default = variable_get('theme_default', 'garland'); $theme_groups = array(); foreach ($themes as &$theme) { + if (!empty($theme->info['hidden'])) { + continue; + } $admin_theme_options[$theme->name] = $theme->info['name']; $theme->is_default = ($theme->name == $theme_default); @@ -373,7 +359,7 @@ function system_theme_enable() { if (isset($_REQUEST['theme']) && isset($_REQUEST['token']) && drupal_valid_token($_REQUEST['token'], 'system-theme-operation-link')) { $theme = $_REQUEST['theme']; // Get current list of themes. - $themes = _system_theme_list(); + $themes = list_themes(); // Check if the specified theme is one recognized by the system. if (!empty($themes[$theme])) { @@ -395,7 +381,7 @@ function system_theme_disable() { if (isset($_REQUEST['theme']) && isset($_REQUEST['token']) && drupal_valid_token($_REQUEST['token'], 'system-theme-operation-link')) { $theme = $_REQUEST['theme']; // Get current list of themes. - $themes = _system_theme_list(); + $themes = list_themes(); // Check if the specified theme is one recognized by the system. if (!empty($themes[$theme])) { @@ -423,7 +409,7 @@ function system_theme_default() { if (isset($_REQUEST['theme']) && isset($_REQUEST['token']) && drupal_valid_token($_REQUEST['token'], 'system-theme-operation-link')) { $theme = $_REQUEST['theme']; // Get current list of themes. - $themes = _system_theme_list(); + $themes = list_themes(); // Check if the specified theme is one recognized by the system. if (!empty($themes[$theme])) {