Follow up on r49790. Fixed a bug on variant select.
authorPhilip Tzou <philip@users.mediawiki.org>
Sun, 26 Apr 2009 14:51:11 +0000 (14:51 +0000)
committerPhilip Tzou <philip@users.mediawiki.org>
Sun, 26 Apr 2009 14:51:11 +0000 (14:51 +0000)
includes/Preferences.php

index da84ea2..6dcbfab 100644 (file)
@@ -168,7 +168,8 @@ class Preferences {
 
                        $options = array();
                        foreach( $variantArray as $code => $name ) {
-                               $options[$code] = "$code - $name";
+                               $display = "$code - $name";
+                               $options[$display] = $code;
                        }
 
                        if(count($variantArray) > 1) {
@@ -182,7 +183,7 @@ class Preferences {
                        }
                }
                
-               if(count($variantArray) > 1 && !$wgDisableLangConversion && !$wgDisableTitleConversion) {
+               if( count($variantArray) > 1 && !$wgDisableLangConversion && !$wgDisableTitleConversion ) {
                        $defaultPreferences['noconvertlink'] =
                                        array(
                                                'type' => 'toggle',