From f7832a1a26f2269d1e55b7e209fdb0eb77f06c0c Mon Sep 17 00:00:00 2001 From: Aleksander Machniak Date: Tue, 20 Aug 2019 15:21:17 +0200 Subject: [PATCH] Removed 'delete_always' option (#6782) --- CHANGELOG | 1 + config/defaults.inc.php | 6 ------ program/lib/Roundcube/rcube_imap.php | 9 +-------- program/steps/settings/func.inc | 14 -------------- program/steps/settings/save_prefs.inc | 1 - 5 files changed, 2 insertions(+), 29 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index 2bf61b230..b84ab8cd5 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -5,6 +5,7 @@ CHANGELOG Roundcube Webmail - Clarified 'address_book_type' option behavior (#6680) - Added cookie mismatch detection, display an error message informing the user to clear cookies - Renamed 'log_session' option to 'session_debug' +- Removed 'delete_always' option (#6782) - Don't log full session identifiers in userlogins log (#6625) - Support $HasAttachment/$HasNoAttachment keywords (#6201) - Support PECL memcached extension as a session and cache storage driver (experimental) diff --git a/config/defaults.inc.php b/config/defaults.inc.php index 51e8be543..d6ffa7716 100644 --- a/config/defaults.inc.php +++ b/config/defaults.inc.php @@ -1215,12 +1215,6 @@ $config['search_mods'] = null; // Example: array('*' => array('subject'=>1, 'fr // Defaults of the addressbook search field configuration. $config['addressbook_search_mods'] = null; // Example: array('name'=>1, 'firstname'=>1, 'surname'=>1, 'email'=>1, '*'=>1); -// 'Delete always' -// This setting reflects if mail should be always deleted -// when moving to Trash fails. This is necessary in some setups -// when user is over quota and Trash is included in the quota. -$config['delete_always'] = false; - // Directly delete messages in Junk instead of moving to Trash $config['delete_junk'] = false; diff --git a/program/lib/Roundcube/rcube_imap.php b/program/lib/Roundcube/rcube_imap.php index 0acbb6b0e..826249ff7 100644 --- a/program/lib/Roundcube/rcube_imap.php +++ b/program/lib/Roundcube/rcube_imap.php @@ -2630,7 +2630,7 @@ class rcube_imap extends rcube_storage * * @return boolean True on success, False on error */ - public function move_message($uids, $to_mbox, $from_mbox='') + public function move_message($uids, $to_mbox, $from_mbox = '') { if (!strlen($from_mbox)) { $from_mbox = $this->folder; @@ -2674,16 +2674,9 @@ class rcube_imap extends rcube_storage if ($moved) { $this->clear_messagecount($from_mbox); $this->clear_messagecount($to_mbox); - $this->set_search_dirty($from_mbox); $this->set_search_dirty($to_mbox); - } - // moving failed - else if ($to_trash && $config->get('delete_always', false)) { - $moved = $this->delete_message($uids, $from_mbox); - } - if ($moved) { // unset threads internal cache unset($this->icache['threads']); diff --git a/program/steps/settings/func.inc b/program/steps/settings/func.inc index efff0d35c..d2bfd2636 100644 --- a/program/steps/settings/func.inc +++ b/program/steps/settings/func.inc @@ -1185,20 +1185,6 @@ function rcmail_user_prefs($current = null) ); } - if (!isset($no_override['delete_always'])) { - if (!$current) { - continue 2; - } - - $field_id = 'rcmfd_delete_always'; - $input = new html_checkbox(array('name' => '_delete_always', 'id' => $field_id, 'value' => 1)); - - $blocks['main']['options']['delete_always'] = array( - 'title' => html::label($field_id, rcube::Q($RCMAIL->gettext('deletealways'))), - 'content' => $input->show($config['delete_always']?1:0), - ); - } - if (!isset($no_override['delete_junk'])) { if (!$current) { continue 2; diff --git a/program/steps/settings/save_prefs.inc b/program/steps/settings/save_prefs.inc index ddfcf82d4..fdbb5eed0 100644 --- a/program/steps/settings/save_prefs.inc +++ b/program/steps/settings/save_prefs.inc @@ -113,7 +113,6 @@ case 'server': 'read_when_deleted' => isset($_POST['_read_when_deleted']), 'skip_deleted' => isset($_POST['_skip_deleted']), 'flag_for_deletion' => isset($_POST['_flag_for_deletion']), - 'delete_always' => isset($_POST['_delete_always']), 'delete_junk' => isset($_POST['_delete_junk']), 'logout_purge' => isset($_POST['_logout_purge']), 'logout_expunge' => isset($_POST['_logout_expunge']),