Another fix for my broken code.
authorfidian <fidian@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Wed, 17 Jan 2001 21:51:40 +0000 (21:51 +0000)
committerfidian <fidian@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Wed, 17 Jan 2001 21:51:40 +0000 (21:51 +0000)
git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@959 7612ce4b-ef26-0410-bec9-ea0150e637f0

functions/imap_mailbox.php

index 6e4fe26aef93cc75a2ba9a1b044527ef3c67dbaf..33801b2779899f09e7e24da35e9fd68a59672ab8 100755 (executable)
 
          // 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;
             }