diff -u b/core/modules/system/lib/Drupal/system/Controller/ThemeListingController.php b/core/modules/system/lib/Drupal/system/Controller/ThemeListingController.php --- b/core/modules/system/lib/Drupal/system/Controller/ThemeListingController.php +++ b/core/modules/system/lib/Drupal/system/Controller/ThemeListingController.php @@ -207,17 +207,29 @@ - uasort($theme_groups['enabled'], 'system_sort_themes'); + uasort($theme_groups['enabled'], array($this, 'systemSortThemes')); $this->moduleHandler->alter('system_themes_page', $theme_groups); - $admin_form = drupal_get_form('system_themes_admin_form', $admin_theme_options); $build = array(); $build[] = array( '#theme' => 'system_themes_page', '#theme_groups' => $theme_groups, '#theme_group_titles' => $theme_group_titles, ); - $build[] = $admin_form; + $build[] = drupal_get_form('system_themes_admin_form', $admin_theme_options); return $build; } + /** + * Array sorting callback; sorts themes by their name. + */ + protected static function systemSortThemes($a, $b) { + if ($a->is_default) { + return -1; + } + if ($b->is_default) { + return 1; + } + return strcasecmp($a->info['name'], $b->info['name']); + } + } diff -u b/core/modules/system/system.module b/core/modules/system/system.module --- b/core/modules/system/system.module +++ b/core/modules/system/system.module @@ -2856,25 +2856,12 @@ } /** - * Array sorting callback; sorts modules or themes by their name. + * Array sorting callback; sorts modules by their name. */ function system_sort_modules_by_info_name($a, $b) { return strcasecmp($a->info['name'], $b->info['name']); } -/** - * Array sorting callback; sorts modules or themes by their name. - */ -function system_sort_themes($a, $b) { - if ($a->is_default) { - return -1; - } - if ($b->is_default) { - return 1; - } - return strcasecmp($a->info['name'], $b->info['name']); -} - /** * Implements hook_system_info_alter(). */ only in patch2: unchanged: --- a/core/modules/system/lib/Drupal/system/Controller/AdminController.php +++ b/core/modules/system/lib/Drupal/system/Controller/AdminController.php @@ -55,8 +55,6 @@ public function index() { $module_info[$module]->info = $info; } - $this->moduleHandler->loadInclude('system', 'admin.inc'); - uasort($module_info, 'system_sort_modules_by_info_name'); $menu_items = array(); only in patch2: unchanged: --- a/core/modules/system/lib/Drupal/system/Form/ModulesUninstallForm.php +++ b/core/modules/system/lib/Drupal/system/Form/ModulesUninstallForm.php @@ -85,7 +85,6 @@ public function buildForm(array $form, array &$form_state) { $profile = drupal_get_profile(); // Sort all modules by their name. - $this->moduleHandler->loadInclude('system', 'inc', 'system.admin'); uasort($disabled, 'system_sort_modules_by_info_name'); $form['uninstall'] = array('#tree' => TRUE);