Added a "bypass trash" checkbox to the mailbox display. When checked, the Delete...
authortassium <tassium@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Thu, 28 Aug 2003 17:28:21 +0000 (17:28 +0000)
committertassium <tassium@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Thu, 28 Aug 2003 17:28:21 +0000 (17:28 +0000)
git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@5582 7612ce4b-ef26-0410-bec9-ea0150e637f0

ChangeLog
functions/imap_messages.php
functions/mailbox_display.php
src/move_messages.php

index 943edb846b79362d3d23f857b7c7e0fa27eaea74..65dfb770ef0cdd565d077df328b120f0425b70cb 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -80,6 +80,8 @@ Version 1.5.0 -- CVS
     with upcoming PHP 4.3.3.
   - Encoding of Russian translation changed to utf-8. Lithuanian translation changed
     to iso-8859-4. Fix allows to use national letters in folder names correctly.
+  - Added "Bypass Trash" checkbox to folder index, used with the Delete
+    button. (tassium)
 
 **************************************
 *** SquirrelMail Stable Series 1.4 ***
index 931ca0369834fd3fcfaa1ff708b2feef90d21983..c591038f249dcf0082f3fac6c1694e19a2e0d741 100755 (executable)
@@ -51,10 +51,10 @@ function sqimap_messages_delete ($imap_stream, $start, $end, $mailbox) {
     sqimap_messages_flag ($imap_stream, $start, $end, "Deleted", true);
 }
 
-function sqimap_msgs_list_delete ($imap_stream, $mailbox, $id) {
+function sqimap_msgs_list_delete ($imap_stream, $mailbox, $id, $bypass_trash=false) {
     global $move_to_trash, $trash_folder, $uid_support;
     $msgs_id = sqimap_message_list_squisher($id);
-    if (($move_to_trash == true) && (sqimap_mailbox_exists($imap_stream, $trash_folder) && ($mailbox != $trash_folder))) {
+    if (($move_to_trash == true) && (sqimap_mailbox_exists($imap_stream, $trash_folder) && ($mailbox != $trash_folder)) && ($bypass_trash != true)) {
         $read = sqimap_run_command ($imap_stream, "COPY $msgs_id " . sqimap_encode_mailbox_name($trash_folder), true, $response, $message, $uid_support);
     }
     $read = sqimap_run_command ($imap_stream, "STORE $msgs_id +FLAGS (\\Deleted)", true, $response, $message, $uid_support);
index 588e813e3546522a80ead0619d72ebda798a498f..2f14e7b13e64c7c629583e70c3f261e79966bf40 100644 (file)
@@ -758,7 +758,8 @@ function mail_message_listing_beginning ($imapConnection,
                               . "$sort" . '&start_messages=1&set_thread=' . "$set_thread"
                               . '&mailbox=' . urlencode($mailbox) . '><small>' . $thread_name
                               . '</a></small>&nbsp;'
-                     , '', '', '' )
+                     , '', '', '' ) . html_tag( 'td', 'Bypass Trash<input type="checkbox" name="bypass_trash">','right','','')
+
                  , '', '', '' );
     }
 
index 70b3d1cb76f09bc97eca4acba41004196b154fc3..8200de48fa4b54d1c1664d38aa054c15db5507d3 100644 (file)
@@ -114,6 +114,7 @@ sqgetGlobalVar('markRead',        $markRead,        SQ_POST);
 sqgetGlobalVar('markUnread',      $markUnread,      SQ_POST);
 sqgetGlobalVar('attache',         $attache,         SQ_POST);
 sqgetGlobalVar('location',        $location,        SQ_POST);
+sqgetGlobalVar('bypass_trash',    $bypass_trash,    SQ_POST);
 
 /* end of get globals */
 
@@ -178,7 +179,7 @@ if(isset($expungeButton)) {
                 sqimap_toggle_flag($imapConnection, $id, '\\Seen',false,true);
             } else  {
                 if (!$button_action) {
-                    sqimap_msgs_list_delete($imapConnection, $mailbox, $id);
+                    sqimap_msgs_list_delete($imapConnection, $mailbox, $id,$bypass_trash);
                     if ($auto_expunge) {
                         $cnt = sqimap_mailbox_expunge($imapConnection, $mailbox, true);
                     }