From: Andrew Garrett Date: Fri, 24 Apr 2009 07:58:23 +0000 (+0000) Subject: Fix storage of settings with no defaults -- treat the default as null and do not... X-Git-Tag: 1.31.0-rc.0~42059 X-Git-Url: http://git.cyclocoop.org/%24action?a=commitdiff_plain;h=8aa7ce82bc43455b909a60972d6859d34ddf0f4e;p=lhc%2Fweb%2Fwiklou.git Fix storage of settings with no defaults -- treat the default as null and do not store if the setting is false or null (but DO store if it is zero) --- diff --git a/includes/User.php b/includes/User.php index a1a4ddd076..ae6bcacff4 100644 --- a/includes/User.php +++ b/includes/User.php @@ -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(),