Replaced an eregi() with strcasecmp() which should be considerably faster.
authorpallo <pallo@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Wed, 17 Jan 2001 08:34:01 +0000 (08:34 +0000)
committerpallo <pallo@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Wed, 17 Jan 2001 08:34:01 +0000 (08:34 +0000)
git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@955 7612ce4b-ef26-0410-bec9-ea0150e637f0

functions/imap_mailbox.php

index 8e2600f059f6e70d70a553fc68377e1cc43a8291..bbd2fa40de0fd5763771469c20d73e2e29130093 100755 (executable)
 
          // 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];