Ver código fonte

Reverted 1.53->1.54 change because it introduced a bug (the new regexp was wrong).

pallo 24 anos atrás
pai
commit
9885b36d40
1 arquivos alterados com 6 adições e 8 exclusões
  1. 6 8
      functions/imap_mailbox.php

+ 6 - 8
functions/imap_mailbox.php

@@ -258,17 +258,15 @@
 
          // 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;
             }