maxrows and port can be integers, so don't require them to have quotes.
authorkink <kink@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Sun, 28 Jul 2002 18:01:57 +0000 (18:01 +0000)
committerkink <kink@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Sun, 28 Jul 2002 18:01:57 +0000 (18:01 +0000)
Fix bug [ 575952 ] conf.pl bug when saving/reading ldap

git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@3148 7612ce4b-ef26-0410-bec9-ea0150e637f0

config/conf.pl

index f7095be..272d64e 100755 (executable)
@@ -205,14 +205,14 @@ while ( $line = <FILE> ) {
                     $tmp =~ s/[\'|\"]\);\s*$//;
                     $charset = $tmp;
                 } elsif ( $tmp =~ /^\s*[\'|\"]port[\'|\"]/i ) {
-                    $tmp =~ s/^\s*[\'|\"]port[\'|\"]\s*=>\s*[\'|\"]//i;
-                    $tmp =~ s/[\'|\"],?\s*$//;
-                    $tmp =~ s/[\'|\"]\);\s*$//;
+                    $tmp =~ s/^\s*[\'|\"]port[\'|\"]\s*=>\s*[\'|\"]?//i;
+                    $tmp =~ s/[\'|\"]?,?\s*$//;
+                    $tmp =~ s/[\'|\"]?\);\s*$//;
                     $port = $tmp;
                 } elsif ( $tmp =~ /^\s*[\'|\"]maxrows[\'|\"]/i ) {
-                    $tmp =~ s/^\s*[\'|\"]maxrows[\'|\"]\s*=>\s*[\'|\"]//i;
-                    $tmp =~ s/[\'|\"],?\s*$//;
-                    $tmp =~ s/[\'|\"]\);\s*$//;
+                    $tmp =~ s/^\s*[\'|\"]maxrows[\'|\"]\s*=>\s*[\'|\"]?//i;
+                    $tmp =~ s/[\'|\"]?,?\s*$//;
+                    $tmp =~ s/[\'|\"]?\);\s*$//;
                     $maxrows = $tmp;
                 } elsif ( $tmp =~ /^\s*[\'|\"]name[\'|\"]/i ) {
                     $tmp =~ s/^\s*[\'|\"]name[\'|\"]\s*=>\s*[\'|\"]//i;