From 3604c641607660243271429041e78d03a9c5d268 Mon Sep 17 00:00:00 2001 From: lkehresman Date: Tue, 9 Jan 2001 01:12:47 +0000 Subject: [PATCH] * Removed sqimap_mailbox_close() function -- automatically expunges mailbox when it closes. Someone suggested that we use this, and I hadn't researched its functionality enough before implementing * Made the $auto_expunge variable actually do something. git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@919 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- ChangeLog | 1 + functions/imap_mailbox.php | 9 --------- functions/smtp.php | 1 - functions/tree.php | 4 ---- src/compose.php | 1 - src/delete_message.php | 1 - src/download.php | 1 - src/move_messages.php | 1 - src/read_body.php | 1 - src/right_main.php | 2 -- src/search.php | 1 - 11 files changed, 1 insertion(+), 22 deletions(-) diff --git a/ChangeLog b/ChangeLog index 819dfead..9e069300 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,6 @@ Version 1.0pre2 -- DEVELOPMENT ------------------------------ +- Made $auto_expunge variable actually do something - Fixed bug that didn't display login failure message - Fixed minor bug in sqimap_mailbox_list - Added sqimap_capability function to check capabilities of server. diff --git a/functions/imap_mailbox.php b/functions/imap_mailbox.php index d77bd1fe..5916ae45 100755 --- a/functions/imap_mailbox.php +++ b/functions/imap_mailbox.php @@ -12,7 +12,6 @@ sqimap_mailbox_select ($imap_stream, $mailbox); fputs ($imap_stream, "a001 EXPUNGE\r\n"); $read = sqimap_read_data($imap_stream, "a001", $handle_errors, $response, $message); - sqimap_mailbox_close ($imap_stream); } @@ -27,14 +26,6 @@ } } - /****************************************************************************** - ** Closes an open mailbox - ******************************************************************************/ - function sqimap_mailbox_close ($imap_stream) { - fputs ($imap_stream, "a001 CLOSE\r\n"); - $tmp = sqimap_read_data($imap_stream, "a001", false, $response, $message); - } - /****************************************************************************** ** Selects a mailbox ******************************************************************************/ diff --git a/functions/smtp.php b/functions/smtp.php index 8c945bbd..dae83a2a 100644 --- a/functions/smtp.php +++ b/functions/smtp.php @@ -501,7 +501,6 @@ $more_headers["In-Reply-To"] = $hdr->message_id; $more_headers["References"] = $hdr->message_id; } - sqimap_mailbox_close($imap_stream); } // In order to remove the problem of users not able to create diff --git a/functions/tree.php b/functions/tree.php index 28cb3e5b..83e2a933 100644 --- a/functions/tree.php +++ b/functions/tree.php @@ -61,7 +61,6 @@ sqimap_mailbox_select($imap_stream, $trash_folder); sqimap_messages_flag ($imap_stream, 1, $numMessages, "Deleted"); sqimap_mailbox_expunge($imap_stream, $trash_folder, true); - sqimap_mailbox_close($imap_stream); } } } else { @@ -73,7 +72,6 @@ sqimap_mailbox_select($imap_stream, $trash_folder); sqimap_messages_flag ($imap_stream, 1, $numMessages, "Deleted"); sqimap_mailbox_expunge($imap_stream, $trash_folder, true); - sqimap_mailbox_close($imap_stream); } } } @@ -106,7 +104,6 @@ for ($j = 0;$j < count($tree[$index]["subNodes"]); $j++) walkTreeInPostOrderCreatingFoldersUnderTrash($tree[$index]["subNodes"][$j], $imap_stream, $tree, $dm, $topFolderName); - sqimap_mailbox_close($imap_stream); } else { sqimap_mailbox_create($imap_stream, $trash_folder . $dm . $subFolderName, ""); sqimap_mailbox_select($imap_stream, $tree[$index]["value"]); @@ -114,7 +111,6 @@ $messageCount = sqimap_get_num_messages($imap_stream, $tree[$index]["value"]); if ($messageCount > 0) sqimap_messages_copy($imap_stream, 1, $messageCount, $trash_folder . $dm . $subFolderName); - sqimap_mailbox_close($imap_stream); } } diff --git a/src/compose.php b/src/compose.php index 565bd923..d35e35f4 100644 --- a/src/compose.php +++ b/src/compose.php @@ -113,7 +113,6 @@ $body = ereg_replace('\\\\', '\\\\', $body); - sqimap_mailbox_close($imapConnection); return; } diff --git a/src/delete_message.php b/src/delete_message.php index 086750e6..4be7772f 100644 --- a/src/delete_message.php +++ b/src/delete_message.php @@ -37,6 +37,5 @@ else header ("Location: $location/right_main.php?sort=$sort&startMessage=$startMessage&mailbox=".urlencode($mailbox)); - sqimap_mailbox_close($imapConnection); sqimap_logout($imapConnection); ?> diff --git a/src/download.php b/src/download.php index faaafc62..27b4d69c 100644 --- a/src/download.php +++ b/src/download.php @@ -155,6 +155,5 @@ } } - sqimap_mailbox_close($imapConnection); sqimap_logout($imapConnection); ?> diff --git a/src/move_messages.php b/src/move_messages.php index ae7155c4..cd1056e4 100644 --- a/src/move_messages.php +++ b/src/move_messages.php @@ -145,7 +145,6 @@ } // Log out this session - sqimap_mailbox_close($imapConnection); sqimap_logout($imapConnection); ?> diff --git a/src/read_body.php b/src/read_body.php index 5825218a..21a6e689 100644 --- a/src/read_body.php +++ b/src/read_body.php @@ -80,7 +80,6 @@ } echo "\n"; echo ""; - sqimap_mailbox_close($imapConnection); sqimap_logout($imapConnection); exit; } diff --git a/src/right_main.php b/src/right_main.php index 6c1ca9b0..3f6bba8a 100644 --- a/src/right_main.php +++ b/src/right_main.php @@ -123,8 +123,6 @@ } do_hook("right_main_bottom"); - // close the connection - sqimap_mailbox_close($imapConnection); sqimap_logout ($imapConnection); ?> diff --git a/src/search.php b/src/search.php index ed92be5e..03945730 100644 --- a/src/search.php +++ b/src/search.php @@ -100,7 +100,6 @@ if ($where && $what) { sqimap_mailbox_select($imapConnection, $mailbox); sqimap_search($imapConnection, $where, $what, $mailbox, $color); - sqimap_mailbox_close($imapConnection); } do_hook("search_bottom"); sqimap_logout ($imapConnection); -- 2.25.1