X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=functions%2Fimap_mailbox.php;h=80d61bb3dbeabf22f0df03830ed05ad17e16ad6e;hb=6b76cffa6afb885fc54c385527ea18e1e7d46dcb;hp=d7774d63cd235b9452429c1b346915ab2aae704c;hpb=d4e46166df04792c6b939356ea5dfda8e47bba7b;p=squirrelmail.git diff --git a/functions/imap_mailbox.php b/functions/imap_mailbox.php index d7774d63..80d61bb3 100755 --- a/functions/imap_mailbox.php +++ b/functions/imap_mailbox.php @@ -5,7 +5,7 @@ * * This implements all functions that manipulate mailboxes * - * @copyright © 1999-2009 The SquirrelMail Project Team + * @copyright 1999-2010 The SquirrelMail Project Team * @license http://opensource.org/licenses/gpl-license.php GNU Public License * @version $Id$ * @package squirrelmail @@ -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