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 f7095be3ebad3e64bf7d8b6477a0250666c682fd..272d64e85049de71be86b21613a837fd57b29573 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;