From 2c1dc6525ed4a642bbcdbd58bb312091baee7ccb Mon Sep 17 00:00:00 2001 From: lkehresman Date: Thu, 10 Aug 2000 16:35:06 +0000 Subject: [PATCH] submitted a patch from Andreas Dahl to make folder deleting work with courier IMAP server. git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@699 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- src/folders.php | 45 +++++++++++++++++++++++++----------------- src/folders_delete.php | 19 +++++++++++------- 2 files changed, 39 insertions(+), 25 deletions(-) diff --git a/src/folders.php b/src/folders.php index 66d62164..bdb1bb55 100644 --- a/src/folders.php +++ b/src/folders.php @@ -108,18 +108,19 @@ echo ""; $count_special_folders = 0; - $num_max = 1; - if ($move_to_trash) - $num_max++; - if ($move_to_sent) - $num_max++; + $num_max = 1; + if (strtolower($imap_server_type) == "courier" || $move_to_trash) + $num_max++; + if ($move_to_sent) + $num_max++; - for ($p = 0; $p < count($boxes) && $count_special_folders < $num_max; $p++) { + for ($p = 0; $p < count($boxes) && $count_special_folders < $num_max; $p++) { if (strtolower($boxes[$p]["unformatted"]) == "inbox") $count_special_folders++; - else if ($boxes[$p]["unformatted"] == $trash_folder && $trash_folder) + else if (strtolower($imap_server_type) == "courier" && + strtolower($boxes[$p]["unformatted"]) == "inbox.trash") $count_special_folders++; - else if ($boxes[$p]["unformatted"] == $sent_folder && $sent_folder) + else if ($boxes[$p]["unformatted"] == $trash_folder && $trash_folder) $count_special_folders++; } @@ -128,10 +129,12 @@ echo "\n"; - if ($default_sub_of_inbox == false) - echo "