From 0c40b2689f10919b37ebaa5c4ec2143f3eb3663f Mon Sep 17 00:00:00 2001 From: fidian Date: Wed, 17 Jan 2001 17:11:20 +0000 Subject: [PATCH] Changed the second ereg() function to a strcasecmp also. Changed the "== 0" into negation - faster than a compare by a nanosecond or less :-) Same went for "else if" to "elseif" (Hope I didn't break it again) git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@956 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- functions/imap_mailbox.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/functions/imap_mailbox.php b/functions/imap_mailbox.php index bbd2fa40..2233f238 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"]) == 0) || - eregi("^".quotemeta($trash_folder).quotemeta($dm), $boxes[$i]["unformatted"]) ) && - ($move_to_trash)) { + if ((!strcasecmp($trash_folder, $boxes[$i]["unformatted"]) || + !strcasecmp($trash_folder . $dm, $boxes[$i]["unformatted"] ) + && ($move_to_trash)) { $boxesnew[] = $boxes[$i]; $boxes[$i]["used"] = true; } - else if(((strcasecmp($sent_folder, $boxes[$i]["unformatted"]) == 0) || - eregi("^".quotemeta($sent_folder).quotemeta($dm), $boxes[$i]["unformatted"]) ) && - ($move_to_sent)) { + elseif ((!strcasecmp($sent_folder, $boxes[$i]["unformatted"]) || + !strcasecmp($sent_folder . $dm, $boxes[$i]["unformatted"] ) + && ($move_to_sent)) { $boxesnew[] = $boxes[$i]; $boxes[$i]["used"] = true; } -- 2.25.1