From: fidian Date: Fri, 2 Feb 2001 16:58:56 +0000 (+0000) Subject: Cleaned up regexp's. X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=8e8ebd27d1f42ed258a2bc0f3babeca5cd76f17a;p=squirrelmail.git Cleaned up regexp's. Removed one ereg. git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@1042 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- diff --git a/functions/imap_general.php b/functions/imap_general.php index 2e216e4d..d7008e75 100755 --- a/functions/imap_general.php +++ b/functions/imap_general.php @@ -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 "
\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))