X-Git-Url: https://vcs.fsf.org/?p=squirrelmail.git;a=blobdiff_plain;f=src%2Fempty_trash.php;h=7bb94d38f25662f9151327250a152204c4fca928;hp=6605b52a391fd1f8c973c6d62b27af2162364a8b;hb=174a32e0b5afca8b1bae89d7e1b81fba1bfbc339;hpb=f740c049d91feb836dd9633be9e8ff52c00d066f diff --git a/src/empty_trash.php b/src/empty_trash.php index 6605b52a..7bb94d38 100644 --- a/src/empty_trash.php +++ b/src/empty_trash.php @@ -11,15 +11,11 @@ ** $Id$ **/ - include('../src/validate.php'); - include("../functions/strings.php"); - include("../config/config.php"); - include("../functions/page_header.php"); - include("../functions/display_messages.php"); - include("../functions/imap.php"); - include("../functions/array.php"); - include("../functions/tree.php"); - include("../src/load_prefs.php"); + require_once('../src/validate.php'); + require_once('../functions/display_messages.php'); + require_once('../functions/imap.php'); + require_once('../functions/array.php'); + require_once('../functions/tree.php'); $imap_stream = sqimap_login($username, $key, $imapServerAddress, $imapPort, 0); @@ -27,7 +23,7 @@ $mailbox = $trash_folder; $boxes = sqimap_mailbox_list($imap_stream); - $dm = sqimap_get_delimiter($imap_stream); + global $delimiter; // 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 @@ -46,7 +42,7 @@ // on the end of the $mailbox string, and compare to that. $j = 0; for ($i = 0;$i < count($boxes);$i++) { - if (substr($boxes[$i]["unformatted"], 0, strlen($mailbox . $dm)) == ($mailbox . $dm)) { + if (substr($boxes[$i]["unformatted"], 0, strlen($mailbox . $delimiter)) == ($mailbox . $delimiter)) { addChildNodeToTree($boxes[$i]["unformatted"], $boxes[$i]["unformatted-dm"], $foldersTree); } }