From 7c8d1194f9b369fc05581cededf4d7556c8caf78 Mon Sep 17 00:00:00 2001 From: philippe_mingo Date: Tue, 29 Jan 2002 16:28:09 +0000 Subject: [PATCH] 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 --- plugins/administrator/options.php | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/plugins/administrator/options.php b/plugins/administrator/options.php index 79ddf489..cc45f04e 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" ); } } -- 2.25.1