$v <> '' test disables saving of integers that are = 0 (ex. $theme_default)
authortokul <tokul@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Sun, 14 Mar 2004 11:00:32 +0000 (11:00 +0000)
committertokul <tokul@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Sun, 14 Mar 2004 11:00:32 +0000 (11:00 +0000)
git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@6793 7612ce4b-ef26-0410-bec9-ea0150e637f0

plugins/administrator/options.php

index 979a8488dc2b952710ff54ef28b485f37da12a46..da4e46a105541db96c76c37f511cf5812642af36 100644 (file)
@@ -592,14 +592,14 @@ if( $fp = @fopen( $cfgfile, 'w' ) ) {
     "global \$version;\n" );
 
     foreach ( $newcfg as $k => $v ) {
-        if ( $k{0} == '$' && $v <> '' ) {
+        if ( $k{0} == '$' && $v <> '' || is_int($v)) {
             if ( substr( $k, 1, 11 ) == 'ldap_server' ) {
                 $v = substr( $v, 0, strlen( $v ) - 1 ) . "\n)";
                 $v = str_replace( 'array(', "array(\n\t", $v );
                 $v = str_replace( "',", "',\n\t", $v );
             }
             fwrite( $fp, "$k = $v;\n" );
-        }
+       }
     }
     fwrite( $fp, '?>' );
     fclose( $fp );