Cleaned up regexp's.
authorfidian <fidian@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Fri, 2 Feb 2001 16:58:56 +0000 (16:58 +0000)
committerfidian <fidian@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Fri, 2 Feb 2001 16:58:56 +0000 (16:58 +0000)
Removed one ereg.

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

functions/imap_general.php

index 2e216e4..d7008e7 100755 (executable)
@@ -82,7 +82,7 @@
      
       if ($response == 'NO') {
          // ignore this error from m$ exchange, it is not fatal (aka bug)
-         if (!ereg('command resulted in',$message)) { 
+         if (strstr($message, 'command resulted in') === false) {
             set_up_language($squirrelmail_language);
             echo "<br><b><font color=$color[2]>\n";
             echo _("ERROR : Could not complete request.");
@@ -257,8 +257,8 @@ function sqimap_get_delimiter ($imap_stream = false) {
                        */
                        fputs ($imap_stream, "a001 NAMESPACE\r\n");
                        $read = sqimap_read_data($imap_stream, 'a001', true, $a, $b);
-                       if (eregi('\* NAMESPACE +(\( *\(.+\) *\)|NIL) +(\( *\(.+\) *\)|NIL) +(\( *\(.+\) *\)|NIL)', $read[0], $data)) {
-                               if (eregi('^\( *\((.*)\) *\)', $data[1], $data2))
+                       if (eregi('\\* NAMESPACE +(\\( *\\(.+\\) *\\)|NIL) +(\\( *\\(.+\\) *\\)|NIL) +(\\( *\\(.+\\) *\\)|NIL)', $read[0], $data)) {
+                               if (eregi('^\\( *\\((.*)\\) *\\)', $data[1], $data2))
                                        $pn = $data2[1];
                                $pna = explode(')(', $pn);
                                while (list($k, $v) = each($pna))