X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;ds=sidebyside;f=functions%2Fimap_messages.php;h=d99bcebd7aa22e34f8e8331181b7713d30142fb2;hb=a2aa472afb6be38b8ab32abe545c242880264cbe;hp=7f9f26309e1ffe28515337d53a20bb8380e0143a;hpb=88f6f618ecbe146746c174660942131badc5aa39;p=squirrelmail.git diff --git a/functions/imap_messages.php b/functions/imap_messages.php index 7f9f2630..d99bcebd 100755 --- a/functions/imap_messages.php +++ b/functions/imap_messages.php @@ -69,16 +69,15 @@ function sqimap_msgs_list_delete($imap_stream, $mailbox, $id, $bypass_trash=fals // FIX ME, remove globals by introducing an associative array with properties // as 4th argument as replacement for the bypass_trash var global $move_to_trash, $trash_folder; - $bRes = true; if (($move_to_trash == true) && ($bypass_trash != true) && (sqimap_mailbox_exists($imap_stream, $trash_folder) && ($mailbox != $trash_folder)) ) { - $bRes = sqimap_msgs_list_copy ($imap_stream, $id, $trash_folder); - } - if ($bRes) { - return sqimap_toggle_flag($imap_stream, $id, '\\Deleted', true, true); - } else { - return false; + /** + * turn off internal error handling (fourth argument = false) and + * ignore copy to trash errors (allows to delete messages when overquota) + */ + sqimap_msgs_list_copy ($imap_stream, $id, $trash_folder, false); } + return sqimap_toggle_flag($imap_stream, $id, '\\Deleted', true, true); }