* Fix preferences for languages without a "default" entry in the date options.
authorAndrew Garrett <werdna@users.mediawiki.org>
Tue, 16 Jun 2009 20:53:59 +0000 (20:53 +0000)
committerAndrew Garrett <werdna@users.mediawiki.org>
Tue, 16 Jun 2009 20:53:59 +0000 (20:53 +0000)
includes/Preferences.php

index b73249c..96f49b3 100644 (file)
@@ -965,6 +965,11 @@ class Preferences {
                $ret = array();
                
                if ($dateopts) {
+                       if ( !in_array( 'default', $dateopts ) ) {
+                               $dateopts[] = 'default'; // Make sure default is always valid
+                                                                                       // Bug 19237
+                       }
+                       
                        $idCnt = 0;
                        $epoch = '20010115161234'; # Wikipedia day
                        foreach( $dateopts as $key ) {