From 781da5d46ad278a22a427618b86628f75b40136c Mon Sep 17 00:00:00 2001 From: tokul Date: Sun, 14 Mar 2004 11:00:32 +0000 Subject: [PATCH] $v <> '' test disables saving of integers that are = 0 (ex. $theme_default) git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@6793 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- plugins/administrator/options.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/administrator/options.php b/plugins/administrator/options.php index 979a8488..da4e46a1 100644 --- a/plugins/administrator/options.php +++ b/plugins/administrator/options.php @@ -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 ); -- 2.25.1