Deleting subfolders of trash works, but it's not very pretty
authorlkehresman <lkehresman@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Mon, 29 Nov 1999 02:58:48 +0000 (02:58 +0000)
committerlkehresman <lkehresman@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Mon, 29 Nov 1999 02:58:48 +0000 (02:58 +0000)
git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@37 7612ce4b-ef26-0410-bec9-ea0150e637f0

src/empty_trash.php

index caed201..bbd917e 100644 (file)
       }
    }
 
-   $trash = getFolderNameMinusINBOX($trash_folder);
-   $trash = "user.$username.$trash";
    // mark them as deleted
    setMessageFlag($imapConnection, 1, $numMessages, "Deleted");
    expungeBox($imapConnection, $mailbox);
 
    // remove subfolders
    for ($i = 0; $i < count($folders); $i++) {
-      if ($folders[$i] != "NONE") {
-         $trash = getFolderNameMinusINBOX($folders[$i]);
-         $trash = "user.$username.$trash";
-         echo "$trash<BR>";
-         removeFolder($imapConnection, $trash);
+      if (($folders[$i] == "NOPE") || ($folders[$i] == "$trash_folder")) {
+      } else {
+         $thisfolder = getFolderNameMinusINBOX($folders[$i]);
+         $thisfolder = "user.$username.$thisfolder";
+         removeFolder($imapConnection, $thisfolder);
       }
    }
 
-   createFolder($imapConnection, "user.$username.$trash_folder");
-
    // Log out this session
    fputs($imapConnection, "1 logout");