From: P?l L?b. <pa...@us...> - 2001-01-17 08:34:04
|
Update of /cvsroot/squirrelmail/squirrelmail/functions In directory usw-pr-cvs1:/tmp/cvs-serv16602 Modified Files: imap_mailbox.php Log Message: Replaced an eregi() with strcasecmp() which should be considerably faster. Index: imap_mailbox.php =================================================================== RCS file: /cvsroot/squirrelmail/squirrelmail/functions/imap_mailbox.php,v retrieving revision 1.55 retrieving revision 1.56 diff -u -w -r1.55 -r1.56 --- imap_mailbox.php 2001/01/17 08:15:21 1.55 +++ imap_mailbox.php 2001/01/17 08:34:01 1.56 @@ -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]; |