From 737e7f9bc94b8dcbfe5f3a1671d56ed27fe1a597 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Bartosz=20Dziewo=C5=84ski?= Date: Thu, 7 Dec 2017 19:37:08 +0100 Subject: [PATCH] Preferences: Sort list of skins by internal name Sort by the internal name, so that the ordering is the same for each display language, especially if some skin names are translated to use a different alphabet and some are not. Bug: T181112 Change-Id: I763150cc578e9aa70990a53895c032f17d96e97a --- includes/Preferences.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/includes/Preferences.php b/includes/Preferences.php index cab1e1f3e1..e6a8bcc6a3 100644 --- a/includes/Preferences.php +++ b/includes/Preferences.php @@ -1171,15 +1171,15 @@ class Preferences { # Only show skins that aren't disabled in $wgSkipSkins $validSkinNames = Skin::getAllowedSkins(); - # Sort by UI skin name. First though need to update validSkinNames as sometimes - # the skinkey & UI skinname differ (e.g. "standard" skinkey is "Classic" in the UI). foreach ( $validSkinNames as $skinkey => &$skinname ) { $msg = $context->msg( "skinname-{$skinkey}" ); if ( $msg->exists() ) { $skinname = htmlspecialchars( $msg->text() ); } } - asort( $validSkinNames ); + # Sort by the internal name, so that the ordering is the same for each display language, + # especially if some skin names are translated to use a different alphabet and some are not. + ksort( $validSkinNames ); $config = $context->getConfig(); $defaultSkin = $config->get( 'DefaultSkin' ); -- 2.20.1