X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=functions%2Fimap_mailbox.php;h=eeb5c7d407dd17f2b14e3a580399e56144f499b1;hb=fbd01364c19ae4bf20d152c11f25b3f865443e11;hp=d7774d63cd235b9452429c1b346915ab2aae704c;hpb=d4e46166df04792c6b939356ea5dfda8e47bba7b;p=squirrelmail.git diff --git a/functions/imap_mailbox.php b/functions/imap_mailbox.php index d7774d63..eeb5c7d4 100755 --- a/functions/imap_mailbox.php +++ b/functions/imap_mailbox.php @@ -110,8 +110,7 @@ function compact_mailboxes_response($ary) { */ for ($i = 0, $iCnt=count($ary); $i < $iCnt; $i++) { if (isset($ary[$i + 1]) && substr($ary[$i], -3) == "}\r\n") { - if (ereg("^(\\* [A-Z]+.*)\\{[0-9]+\\}([ \n\r\t]*)$", - $ary[$i], $regs)) { + if (preg_match('/^(\* [A-Z]+.*)\{[0-9]+\}([ \n\r\t]*)$/', $ary[$i], $regs)) { $ary[$i] = $regs[1] . '"' . addslashes(trim($ary[$i+1])) . '"' . $regs[2]; array_splice($ary, $i+1, 2); } @@ -676,8 +675,7 @@ function sqimap_mailbox_parse ($line) { $boxesall[$g]['id'] = $g; $boxesall[$g]['flags'] = array(); - if (isset($line[$g])) { - ereg("\(([^)]*)\)",$line[$g],$regs); + if (isset($line[$g]) && preg_match('/\(([^)]*)\)/',$line[$g],$regs) ) { /** * Since 1.5.1 flags are stored with RFC3501 naming * and also the old way for backwards compatibility