From e2370222dc6e0e9ec897575778ec5eec6c337ade Mon Sep 17 00:00:00 2001 From: lkehresman Date: Tue, 7 Dec 1999 22:02:27 +0000 Subject: [PATCH] Fixed a bug in deleting messages where it wouldn't delete the messages. Now it does. git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@70 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- functions/imap.php | 2 -- functions/mailbox.php | 3 ++- src/compose_send.php | 12 ++++++------ src/left_main.php | 2 +- src/move_messages.php | 7 ++----- 5 files changed, 11 insertions(+), 15 deletions(-) diff --git a/functions/imap.php b/functions/imap.php index e0feecfd..7fd356f9 100644 --- a/functions/imap.php +++ b/functions/imap.php @@ -91,7 +91,5 @@ } else { setMessageFlag($imapConnection, $a, $b, "Deleted"); } - if ($auto_expunge == true) - expungeBox($imapConnection, $mailbox, $numMessages); } ?> diff --git a/functions/mailbox.php b/functions/mailbox.php index a0f3d70d..b5fa548d 100644 --- a/functions/mailbox.php +++ b/functions/mailbox.php @@ -183,12 +183,13 @@ function copyMessages($imapConnection, $from_id, $to_id, $folder) { fputs($imapConnection, "mailboxStore COPY $from_id:$to_id \"$folder\"\n"); $read = fgets($imapConnection, 1024); + echo ">>> $read
"; while ((substr($read, 0, 15) != "mailboxStore OK") && (substr($read, 0, 15) != "mailboxStore NO")) { $read = fgets($imapConnection, 1024); + echo ">>> $read
"; } if (substr($read, 0, 15) == "mailboxStore NO") { - echo "ERROR... $read
"; return false; } else if (substr($read, 0, 15) == "mailboxStore OK") { return true; diff --git a/src/compose_send.php b/src/compose_send.php index 4532f636..b5057d66 100644 --- a/src/compose_send.php +++ b/src/compose_send.php @@ -7,7 +7,12 @@ include("../functions/smtp.php"); include("../functions/display_messages.php"); - if ($passed_to == "") { + if ($passed_body == "") { + echo ""; + displayPageHeader("None"); + plain_error_message("You have not entered a message body."); + exit; + } else if ($passed_to == "") { echo ""; displayPageHeader("None"); plain_error_message("You have not filled in the \"To:\" field."); @@ -22,11 +27,6 @@ echo "\n"; exit; - - echo ""; - displayPageHeader("None"); - plain_error_message("Message NOT sent

You have not entered anything into the To: field.
Press the BACK button on your browser"); - exit; } else if ($passed_subject == "") { echo ""; displayPageHeader("None"); diff --git a/src/left_main.php b/src/left_main.php index 292f4b55..2c13f745 100644 --- a/src/left_main.php +++ b/src/left_main.php @@ -68,7 +68,7 @@ if (($move_to_trash == true) && ($mailbox == $trash_folder)) { $urlMailbox = urlencode($mailbox); selectMailbox($imapConnection, $mailbox, $numNessages); - echo "  (empty)"; + echo "    (empty)"; } echo "
\n"; } diff --git a/src/move_messages.php b/src/move_messages.php index 5852a8eb..1edfa827 100644 --- a/src/move_messages.php +++ b/src/move_messages.php @@ -7,9 +7,6 @@ include("../functions/display_messages.php"); include("../functions/imap.php"); - for ($i = 0; $i < count($msg); $i++) { - echo "MSG: $msg[$i]
"; - } function putSelectedMessagesIntoString($msg) { $j = 0; @@ -32,8 +29,7 @@ $i++; } } - - + $imapConnection = loginToImapServer($username, $key, $imapServerAddress); // switch to the mailbox, and get the number of messages in it. @@ -51,6 +47,7 @@ // loop because we never increment j. so check to see if msg[0] is set or not to fix this. while ($j < count($msg)) { if ($msg[$i]) { + echo "MSG: $msg[$i]
"; deleteMessages($imapConnection, $msg[$i], $msg[$i], $numMessages, $trash_folder, $move_to_trash, $auto_expunge, $mailbox); $j++; } -- 2.25.1