Sort the list of skins in My Preferences --> Skins by alphabetical order using asort(). At the moment it appears to just be in random order.

This commit is contained in:
Nick Jenkins 2006-11-03 06:08:08 +00:00
parent 5d7a6166d6
commit f0b47f3f45
2 changed files with 10 additions and 2 deletions

View file

@ -130,6 +130,7 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN
* (bug 1133) Special:Emailuser: add an option to send yourself a copy your mail.
* (bug 461) Allow "Categories:" link at bottom of pages to be customized via
pagecategorieslink message.
* Sort the list of skins in "My Preferences" -> Skins by alphabetical order.
== Languages updated ==

View file

@ -732,12 +732,19 @@ class PreferencesForm {
# Only show members of Skin::getSkinNames() rather than
# $skinNames (skins is all skin names from Language.php)
$validSkinNames = Skin::getSkinNames();
foreach ($validSkinNames as $skinkey => $skinname ) {
# 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 ) {
if ( isset( $skinNames[$skinkey] ) ) {
$skinname = $skinNames[$skinkey];
}
}
asort($validSkinNames);
foreach ($validSkinNames as $skinkey => $sn ) {
if ( in_array( $skinkey, $wgSkipSkins ) ) {
continue;
}
$checked = $skinkey == $this->mSkin ? ' checked="checked"' : '';
$sn = isset( $skinNames[$skinkey] ) ? $skinNames[$skinkey] : $skinname;
$mplink = htmlspecialchars($mptitle->getLocalURL("useskin=$skinkey"));
$previewlink = "<a target='_blank' href=\"$mplink\">$previewtext</a>";