This fix makes the plugin backward compatible with conf.pl
authorphilippe_mingo <philippe_mingo@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Tue, 29 Jan 2002 16:28:09 +0000 (16:28 +0000)
committerphilippe_mingo <philippe_mingo@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Tue, 29 Jan 2002 16:28:09 +0000 (16:28 +0000)
git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@2285 7612ce4b-ef26-0410-bec9-ea0150e637f0

plugins/administrator/options.php

index 79ddf48939ddf99ad9ed9711d899dfa843196d16..cc45f04edce2d2a6ca2834ddd3663b13719e3e81 100644 (file)
@@ -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" );
     }
 }