Reverted 1.53->1.54 change because it introduced a bug (the new regexp was wrong).
authorpallo <pallo@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Wed, 17 Jan 2001 08:15:21 +0000 (08:15 +0000)
committerpallo <pallo@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Wed, 17 Jan 2001 08:15:21 +0000 (08:15 +0000)
git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@954 7612ce4b-ef26-0410-bec9-ea0150e637f0

functions/imap_mailbox.php

index 01ab0f9af19c8b8ed4ecb6c7301880887b234e4b..8e2600f059f6e70d70a553fc68377e1cc43a8291 100755 (executable)
 
          // Then list special folders and their subfolders
          for ($i = 0 ; $i <= count($boxes) ; $i++) {
-           if ($move_to_trash && 
-               eregi("^" . quotemeta($trash_folder) . "(" . 
-                   quotemeta($dm) . ")?$", $boxes[$i]["unformatted"]))
-           {
+            if((eregi("^".quotemeta($trash_folder).'$', $boxes[$i]["unformatted"]) ||
+                eregi("^".quotemeta($trash_folder).quotemeta($dm), $boxes[$i]["unformatted"]) )  &&
+               ($move_to_trash)) {        
                $boxesnew[] = $boxes[$i];
                $boxes[$i]["used"] = true;
             }
-            elseif ($move_to_sent &&
-               eregi("^" . quotemeta($sent_folder) . "(" .
-                   quotemeta($dm) . ")?$", $boxes[$i]["unformatted"]))
-           {
+            else if((eregi("^".quotemeta($sent_folder).'$', $boxes[$i]["unformatted"]) ||
+                     eregi("^".quotemeta($sent_folder).quotemeta($dm), $boxes[$i]["unformatted"]) )  &&
+                    ($move_to_sent)) {        
                $boxesnew[] = $boxes[$i];
                $boxes[$i]["used"] = true;
             }