From: tokul Date: Sat, 30 Sep 2006 09:49:08 +0000 (+0000) Subject: ignore msg copy errors when messages are deleted. Most common error is related X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=a2aa472afb6be38b8ab32abe545c242880264cbe;p=squirrelmail.git ignore msg copy errors when messages are deleted. Most common error is related to quota issues. Updated function tries to copy message to trash and then tags it as deleted. If we can store message in trash, message is stored. If we can't, trash folder is bypassed. added version information to two configuration variables git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@11783 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- diff --git a/ChangeLog b/ChangeLog index 08e01578..6ee3458c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -138,6 +138,8 @@ Version 1.5.2 - CVS - Added check_plugin_version() function. - If mailbox name starts with slash or contains ../, error message is generated. Safety check for insecure default UW IMAP setup (#1557078). + - Ignore message copy errors when messages are deleted. Allows to delete + messages when quota is exceeded. (#614887) (#646386) (#1446026) Version 1.5.1 (branched on 2006-02-12) -------------------------------------- diff --git a/config/conf.pl b/config/conf.pl index 5f2bc814..b11e04f1 100755 --- a/config/conf.pl +++ b/config/conf.pl @@ -357,8 +357,6 @@ $noselect_fix_enable = 'false' if ( !$noselect_fix_enable ); $frame_top = "_top" if ( !$frame_top ); $provider_uri = '' if ( !$provider_uri ); $provider_name = '' if ( !$provider_name ); -$edit_identity = 'true' if ( !$edit_identity ); -$edit_name = 'true' if ( !$edit_name ); $no_list_for_subscribe = 'false' if ( !$no_list_for_subscribe ); $allow_charset_search = 'true' if ( !$allow_charset_search ); $allow_advanced_search = 0 if ( !$allow_advanced_search) ; @@ -371,6 +369,9 @@ $default_use_javascript_addr_book = 'false' if (! $default_use_javascript_addr_b # since 1.2.0 $hide_sm_attributions = 'false' if ( !$hide_sm_attributions ); +# since 1.2.5 +$edit_identity = 'true' if ( !$edit_identity ); +$edit_name = 'true' if ( !$edit_name ); # since 1.4.0 $use_smtp_tls= 'false' if ( !$use_smtp_tls); 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); }