When reading an old-style user_options blob, use the default value for any preference...
authorRoan Kattouw <catrope@users.mediawiki.org>
Mon, 11 Oct 2010 14:10:23 +0000 (14:10 +0000)
committerRoan Kattouw <catrope@users.mediawiki.org>
Mon, 11 Oct 2010 14:10:23 +0000 (14:10 +0000)
includes/User.php

index 6430ace..a3f6cdd 100644 (file)
@@ -2411,7 +2411,9 @@ class User {
                $this->mOptionsLoaded = true;
                $this->mOptionOverrides = array();
 
-               $this->mOptions = array();
+               // If an option is not set in $str, use the default value
+               $this->mOptions = self::getDefaultOptions();
+               
                $a = explode( "\n", $str );
                foreach ( $a as $s ) {
                        $m = array();