From: philippe_mingo Date: Tue, 29 Jan 2002 16:28:09 +0000 (+0000) Subject: This fix makes the plugin backward compatible with conf.pl X-Git-Url: https://vcs.fsf.org/?p=squirrelmail.git;a=commitdiff_plain;h=7c8d1194f9b369fc05581cededf4d7556c8caf78 This fix makes the plugin backward compatible with conf.pl git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@2285 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- diff --git a/plugins/administrator/options.php b/plugins/administrator/options.php index 79ddf48..cc45f04 100644 --- a/plugins/administrator/options.php +++ b/plugins/administrator/options.php @@ -299,20 +299,24 @@ foreach ( $newcfg as $k => $v ) { fwrite( $fp, ', ' ); } fwrite( $fp, substr( $k, 0, $i) ); - $not_first = TRUE; } } else { if( $not_first ) { fwrite( $fp, ', ' ); - } + } fwrite( $fp, $k ); - $not_first = TRUE; } + $not_first = TRUE; } } fwrite( $fp, ";\n" ); foreach ( $newcfg as $k => $v ) { if ( $k{0} == '$' ) { + 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" ); } }