From 61a4ac35b2e566e41aba064f24d268d2d4e57594 Mon Sep 17 00:00:00 2001 From: lkehresman Date: Wed, 24 Nov 1999 17:54:40 +0000 Subject: [PATCH] * added the config option, auto_expunge * added "empty trash" option git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@26 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- BUG | 5 +---- TODO | 15 +-------------- config/config.php | 4 ++++ functions/mailbox.php | 10 ++++++++-- functions/mailbox_display.php | 10 ++++++++-- 5 files changed, 22 insertions(+), 22 deletions(-) diff --git a/BUG b/BUG index e4d4e62f..e90abb02 100644 --- a/BUG +++ b/BUG @@ -1,4 +1 @@ -KNOWN BUGS ----------------------------------------- -- Subject in Nathan's INBOX message 757 is bad -- There are no grid lines in IE on message list +see bug manager diff --git a/TODO b/TODO index 0e7604f5..bc96144e 100644 --- a/TODO +++ b/TODO @@ -1,15 +1,2 @@ -TODO ------------- -- Don't view "deleted" messages -- Write JavaScript for left side bar to auto log out on unload -- Todo manager -- Bug tracker -- Moving messages to folders -- Deleting messages (send to trash) -- Expunge mailboxes +see todo manager - -DONE ------------- -- (nathan) Abstract header stuff so it can be used on all pages -- (luke) Genericize login page diff --git a/config/config.php b/config/config.php index 24a8d58b..99b1fa8c 100644 --- a/config/config.php +++ b/config/config.php @@ -24,9 +24,13 @@ $version = "0.0.1"; * - This is the path to the default trash folder. For Cyrus IMAP, it * would be "INBOX.Trash", but for UW it would be "Trash". We need the * full path name here. + * $auto_expunge + * - If this is true, when a message is moved or copied, the source mailbox + * will get expunged, removing all messages marked "Deleted". */ $move_to_trash = true; $trash_folder = "INBOX.Trash"; +$auto_expunge = true; ?> diff --git a/functions/mailbox.php b/functions/mailbox.php index 1bcc6340..548706bd 100644 --- a/functions/mailbox.php +++ b/functions/mailbox.php @@ -48,8 +48,8 @@ } } - function setMessageFlag($imapConnection, $i, $flag) { - fputs($imapConnection, "messageStore STORE $i:$i +FLAGS (\\$flag)\n"); + function setMessageFlag($imapConnection, $i, $q, $flag) { + fputs($imapConnection, "messageStore STORE $i:$q +FLAGS (\\$flag)\n"); } function getMessageFlags($imapConnection, $i, &$flags) { @@ -146,4 +146,10 @@ echo "UNKNOWN ERROR copying messages $from_id to $to_id to folder $folder.
"; return false; } + + /** expunges a mailbox **/ + function expungeBox($imapConnection, $mailbox) { + selectMailbox($imapConnection, $mailbox, $num); + fputs($imapConnection, "1 EXPUNGE\n"); + } ?> diff --git a/functions/mailbox_display.php b/functions/mailbox_display.php index 16826bfa..06df3ad1 100644 --- a/functions/mailbox_display.php +++ b/functions/mailbox_display.php @@ -31,6 +31,8 @@ ** This function loops through a group of messages in the mailbox and shows them **/ function showMessagesForMailbox($imapConnection, $mailbox, $numMessages, $startMessage, $sort) { + include("../config/config.php"); + $j = 1; while ($j <= $numMessages) { $q = 0; @@ -128,7 +130,9 @@ /** The "DELETE" button */ echo ""; echo "
"; - echo " selected messages"; + echo ""; + if (($move_to_trash == true) && ($mailbox == $trash_folder)) + echo "            Empty Trash"; echo ""; echo ""; @@ -161,7 +165,9 @@ /** The "DELETE" button */ echo ""; - echo " selected messages"; + echo ""; + if (($move_to_trash == true) && ($mailbox == $trash_folder)) + echo "            Empty Trash"; echo ""; echo "
\n"; -- 2.25.1