Fix storage of settings with no defaults -- treat the default as null and do not...
authorAndrew Garrett <werdna@users.mediawiki.org>
Fri, 24 Apr 2009 07:58:23 +0000 (07:58 +0000)
committerAndrew Garrett <werdna@users.mediawiki.org>
Fri, 24 Apr 2009 07:58:23 +0000 (07:58 +0000)
includes/User.php

index a1a4ddd..ae6bcac 100644 (file)
@@ -3545,7 +3545,8 @@ class User {
                        return;
                
                foreach( $saveOptions as $key => $value ) {
-                       if ( is_null(self::getDefaultOption($key)) ||
+                       if ( ( is_null(self::getDefaultOption($key)) &&
+                                       !( $value === false || is_null($value) ) ) ||
                                        $value != self::getDefaultOption( $key ) ) {
                                $insert_rows[] = array(
                                                'up_user' => $this->getId(),