Update of /cvsroot/squirrelmail/squirrelmail/functions
In directory sc8-pr-cvs1:/tmp/cvs-serv10439/functions
Modified Files:
mailbox_display.php imap_messages.php
Log Message:
Added a "bypass trash" checkbox to the mailbox display. When checked, the Delete button ignores the use of the trash folder.
Index: mailbox_display.php
===================================================================
RCS file: /cvsroot/squirrelmail/squirrelmail/functions/mailbox_display.php,v
retrieving revision 1.339
retrieving revision 1.340
diff -u -w -r1.339 -r1.340
--- mailbox_display.php 21 Aug 2003 00:57:45 -0000 1.339
+++ mailbox_display.php 28 Aug 2003 17:28:20 -0000 1.340
@@ -758,7 +758,8 @@
. "$sort" . '&start_messages=1&set_thread=' . "$set_thread"
. '&mailbox=' . urlencode($mailbox) . '><small>' . $thread_name
. '</a></small> '
- , '', '', '' )
+ , '', '', '' ) . html_tag( 'td', 'Bypass Trash<input type="checkbox" name="bypass_trash">','right','','')
+
, '', '', '' );
}
Index: imap_messages.php
===================================================================
RCS file: /cvsroot/squirrelmail/squirrelmail/functions/imap_messages.php,v
retrieving revision 1.144
retrieving revision 1.145
diff -u -w -r1.144 -r1.145
--- imap_messages.php 15 Aug 2003 14:46:15 -0000 1.144
+++ imap_messages.php 28 Aug 2003 17:28:21 -0000 1.145
@@ -51,10 +51,10 @@
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);
|