From: fidian Date: Wed, 17 Jan 2001 21:51:40 +0000 (+0000) Subject: Another fix for my broken code. X-Git-Url: https://vcs.fsf.org/?p=squirrelmail.git;a=commitdiff_plain;h=23ed73eb80c7af06f1868ffa1e3be078922a63a3 Another fix for my broken code. git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@959 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- diff --git a/functions/imap_mailbox.php b/functions/imap_mailbox.php index 6e4fe26a..33801b27 100755 --- a/functions/imap_mailbox.php +++ b/functions/imap_mailbox.php @@ -258,15 +258,15 @@ // Then list special folders and their subfolders for ($i = 0 ; $i <= count($boxes) ; $i++) { - if (! (strcasecmp($trash_folder, $boxes[$i]["unformatted"]) && - strcasecmp($trash_folder . $dm, $boxes[$i]["unformatted"] )) - && $move_to_trash) { + if ($move_to_trash && + eregi("^" . quotemeta($trash_folder) . "(" . + quotemeta($dm) . ".*)?$", $boxes[$i]["unformatted"])) { $boxesnew[] = $boxes[$i]; $boxes[$i]["used"] = true; } - elseif (! (strcasecmp($sent_folder, $boxes[$i]["unformatted"]) && - strcasecmp($sent_folder . $dm, $boxes[$i]["unformatted"] )) - && $move_to_sent) { + elseif ($move_to_sent && + eregi("^" . quotemeta($sent_folder) . "(" . + quotemeta($dm) . ".*)?$", $boxes[$i]["unformatted"])) { $boxesnew[] = $boxes[$i]; $boxes[$i]["used"] = true; }