From: Bartosz DziewoƄski Date: Thu, 7 Dec 2017 18:37:08 +0000 (+0100) Subject: Preferences: Sort list of skins by internal name X-Git-Tag: 1.31.0-rc.0~1250^2 X-Git-Url: http://git.cyclocoop.org/%22.%24h.%22?a=commitdiff_plain;h=737e7f9bc94b8dcbfe5f3a1671d56ed27fe1a597;p=lhc%2Fweb%2Fwiklou.git 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 --- 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' );