From 0cff63835c93056e41434c3858880b9d864ae912 Mon Sep 17 00:00:00 2001 From: pallo Date: Wed, 17 Jan 2001 08:34:01 +0000 Subject: [PATCH] Replaced an eregi() with strcasecmp() which should be considerably faster. git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@955 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- functions/imap_mailbox.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/functions/imap_mailbox.php b/functions/imap_mailbox.php index 8e2600f0..bbd2fa40 100755 --- a/functions/imap_mailbox.php +++ b/functions/imap_mailbox.php @@ -258,13 +258,13 @@ // Then list special folders and their subfolders for ($i = 0 ; $i <= count($boxes) ; $i++) { - if((eregi("^".quotemeta($trash_folder).'$', $boxes[$i]["unformatted"]) || + if(((strcasecmp($trash_folder, $boxes[$i]["unformatted"]) == 0) || eregi("^".quotemeta($trash_folder).quotemeta($dm), $boxes[$i]["unformatted"]) ) && ($move_to_trash)) { $boxesnew[] = $boxes[$i]; $boxes[$i]["used"] = true; } - else if((eregi("^".quotemeta($sent_folder).'$', $boxes[$i]["unformatted"]) || + else if(((strcasecmp($sent_folder, $boxes[$i]["unformatted"]) == 0) || eregi("^".quotemeta($sent_folder).quotemeta($dm), $boxes[$i]["unformatted"]) ) && ($move_to_sent)) { $boxesnew[] = $boxes[$i]; -- 2.25.1