From: lkehresman Date: Mon, 29 Nov 1999 17:07:33 +0000 (+0000) Subject: You cannot delete special folders or their subfolders now X-Git-Url: https://vcs.fsf.org/?p=squirrelmail.git;a=commitdiff_plain;h=e457e585bd339e3c0fecdb1ffa206c94c0ed149a You cannot delete special folders or their subfolders now git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@40 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- diff --git a/config/config.php b/config/config.php index 9048b0aa..4cbbb46b 100644 --- a/config/config.php +++ b/config/config.php @@ -34,15 +34,14 @@ $trash_folder = "INBOX.Trash"; $auto_expunge = true; /* Special Folders are folders that can't be manipulated like normal user created - folders can. A couple of examples would be "INBOX", "INBOX.Trash". We have + folders can. A couple of examples would be "INBOX.Trash", "INBOX.Drafts". We have them set to Netscape's default mailboxes, but this obviously can be changed. To add one, just add a new number to the array. -*/ -$special_folders[0] = "INBOX"; -$special_folders[1] = "INBOX.Trash"; -$special_folders[2] = "INBOX.Sent"; -$special_folders[3] = "INBOX.Drafts"; -$special_folders[4] = "INBOX.Templates"; - + NOTE: INBOX is handled separately. Do not put it in this list +*/ +$special_folders[0] = $trash_folder; +$special_folders[1] = "INBOX.Sent"; +$special_folders[2] = "INBOX.Drafts"; +$special_folders[3] = "INBOX.Templates"; ?> diff --git a/src/folders.php b/src/folders.php index 99150b54..d4536302 100644 --- a/src/folders.php +++ b/src/folders.php @@ -23,11 +23,15 @@ for ($i = 0; $i < count($boxesUnformatted); $i++) { $use_folder = true; for ($p = 0; $p < count($special_folders); $p++) { - if ($special_folders[$p] == $boxesUnformatted[$i]) + if (substr($boxesUnformatted[$i], 0, strlen($special_folders[$p])) == $special_folders[$p]) { $use_folder = false; + } } + if ($boxesUnformatted[$i] == "INBOX") + $use_folder = false; + if ($use_folder == true) - echo "