X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;ds=sidebyside;f=src%2Fempty_trash.php;h=67adce7bbda10d5a635bb42fd7ad60b6c39383f7;hb=ebd2391cb0c5e3049870f90fa8a8b28707e9571a;hp=d67d7514bfbc23e4495585a2256b0e2b868fc762;hpb=0a1d5f3a4aeb3f44c5af035b2f9a29bd53f573ad;p=squirrelmail.git diff --git a/src/empty_trash.php b/src/empty_trash.php index d67d7514..67adce7b 100644 --- a/src/empty_trash.php +++ b/src/empty_trash.php @@ -1,47 +1,76 @@ -\n"; - - // According to RFC2060, a DELETE command should NOT remove inferiors (sub folders) - // so lets go through the list of subfolders and remove them before removing the - // parent. - // BUG??? - what if a subfolder has a subfolder?? need to start at lowest level - // and work up. - - - for ($i = 0; $i < count($boxes); $i++) { -// if (($boxes[$i]["UNFORMATTED"] == $mailbox) || -// (substr($boxes[$i]["UNFORMATTED"], 0, strlen($mailbox . $dm)) == $mailbox . $dm)) { - if (($boxes[$i]["UNFORMATTED"] != $mailbox) && (substr($boxes[$i]["UNFORMATTED"], 0, strlen($mailbox . $dm)) == $mailbox . $dm)) { - removeFolder($imapConnection, $boxes[$i]["UNFORMATTED"]); - echo "removing " . $boxes[$i]["UNFORMATTED"] . "
"; - } - } - // now lets remove the top level trash folder - removeFolder($imapConnection, $mailbox); - - createFolder($imapConnection, "$trash_folder", ""); - - selectMailbox($imapConnection, $trash_folder, $numMessages); - echo "\n"; - displayPageHeader($color, $mailbox); - messages_deleted_message($trash_folder, $sort, $startMessage, $color); - fputs($imapConnection, "1 logout"); -?> +