From 8cf653ad4242424f2816edf3d2cea09bab66c6e5 Mon Sep 17 00:00:00 2001 From: pallo Date: Fri, 24 Nov 2000 14:47:54 +0000 Subject: [PATCH] Applied patch #102205 + some extra code to fix bug #121006. git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@854 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- functions/imap_mailbox.php | 6 +++--- functions/mailbox_display.php | 2 +- functions/tree.php | 4 ++-- src/delete_message.php | 2 +- src/move_messages.php | 6 +++--- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/functions/imap_mailbox.php b/functions/imap_mailbox.php index c5a147c8..a096d6c0 100755 --- a/functions/imap_mailbox.php +++ b/functions/imap_mailbox.php @@ -8,10 +8,10 @@ /****************************************************************************** ** Expunges a mailbox ******************************************************************************/ - function sqimap_mailbox_expunge ($imap_stream, $mailbox) { + function sqimap_mailbox_expunge ($imap_stream, $mailbox,$handle_errors) { sqimap_mailbox_select ($imap_stream, $mailbox); fputs ($imap_stream, "a001 EXPUNGE\r\n"); - $read = sqimap_read_data($imap_stream, "a001", true, $response, $message); + $read = sqimap_read_data($imap_stream, "a001", $handle_errors, $response, $message); sqimap_mailbox_close ($imap_stream); } @@ -53,7 +53,7 @@ } if ($auto_expunge) { fputs ($imap_stream, "a001 EXPUNGE\r\n"); - $tmp = sqimap_read_data($imap_stream, "a001", true, $a, $b); + $tmp = sqimap_read_data($imap_stream, "a001", false, $a, $b); } } diff --git a/functions/mailbox_display.php b/functions/mailbox_display.php index 3beb51cf..5503e7b1 100644 --- a/functions/mailbox_display.php +++ b/functions/mailbox_display.php @@ -107,7 +107,7 @@ global $message_highlight_list; global $auto_expunge; - sqimap_mailbox_expunge($imapConnection, $mailbox); + sqimap_mailbox_expunge($imapConnection, $mailbox, false); sqimap_mailbox_select($imapConnection, $mailbox); if (!$use_cache) { diff --git a/functions/tree.php b/functions/tree.php index 99a7198b..28cb3e5b 100644 --- a/functions/tree.php +++ b/functions/tree.php @@ -60,7 +60,7 @@ if ($numMessages > 0) { sqimap_mailbox_select($imap_stream, $trash_folder); sqimap_messages_flag ($imap_stream, 1, $numMessages, "Deleted"); - sqimap_mailbox_expunge($imap_stream, $trash_folder); + sqimap_mailbox_expunge($imap_stream, $trash_folder, true); sqimap_mailbox_close($imap_stream); } } @@ -72,7 +72,7 @@ if ($numMessages > 0) { sqimap_mailbox_select($imap_stream, $trash_folder); sqimap_messages_flag ($imap_stream, 1, $numMessages, "Deleted"); - sqimap_mailbox_expunge($imap_stream, $trash_folder); + sqimap_mailbox_expunge($imap_stream, $trash_folder, true); sqimap_mailbox_close($imap_stream); } } diff --git a/src/delete_message.php b/src/delete_message.php index 132b68c9..086750e6 100644 --- a/src/delete_message.php +++ b/src/delete_message.php @@ -29,7 +29,7 @@ sqimap_messages_delete($imapConnection, $message, $message, $mailbox); if ($auto_expunge) - sqimap_mailbox_expunge($imapConnection, $mailbox); + sqimap_mailbox_expunge($imapConnection, $mailbox, true); $location = get_location(); if ($where && $what) diff --git a/src/move_messages.php b/src/move_messages.php index 87fb326c..ae7155c4 100644 --- a/src/move_messages.php +++ b/src/move_messages.php @@ -51,7 +51,7 @@ // expunge-on-demand if user isn't using move_to_trash or auto_expunge if($expungeButton) { - sqimap_mailbox_expunge($imapConnection, $mailbox); + sqimap_mailbox_expunge($imapConnection, $mailbox, true); $location = get_location(); if ($where && $what) header ("Location: $location/search.php?mailbox=".urlencode($mailbox)."&what=".urlencode($what)."&where=".urlencode($where)); @@ -102,7 +102,7 @@ $i++; } if ($auto_expunge) { - sqimap_mailbox_expunge($imapConnection, $mailbox); + sqimap_mailbox_expunge($imapConnection, $mailbox, true); } $location = get_location(); if ($where && $what) @@ -131,7 +131,7 @@ $i++; } if ($auto_expunge == true) - sqimap_mailbox_expunge($imapConnection, $mailbox); + sqimap_mailbox_expunge($imapConnection, $mailbox, true); $location = get_location(); if ($where && $what) -- 2.25.1