From 1b30a710cfe7fb2917ed337c52b06bb2236e1a05 Mon Sep 17 00:00:00 2001 From: alecpl Date: Sun, 8 Apr 2012 16:34:36 +0000 Subject: - Add option to delete messages instead of moving to Trash when in Junk folder (#1486686) --- program/steps/settings/func.inc | 10 ++++++++++ program/steps/settings/save_prefs.inc | 1 + 2 files changed, 11 insertions(+) (limited to 'program/steps/settings') diff --git a/program/steps/settings/func.inc b/program/steps/settings/func.inc index fc836ed50..48d1d5a0b 100644 --- a/program/steps/settings/func.inc +++ b/program/steps/settings/func.inc @@ -816,6 +816,16 @@ function rcmail_user_prefs($current=null) ); } + if (!isset($no_override['delete_junk'])) { + $field_id = 'rcmfd_delete_junk'; + $input_delete_junk = new html_checkbox(array('name' => '_delete_junk', 'id' => $field_id, 'value' => 1)); + + $blocks['main']['options']['delete_junk'] = array( + 'title' => html::label($field_id, Q(rcube_label('deletejunk'))), + 'content' => $input_delete_junk->show($config['delete_junk']?1:0), + ); + } + // Trash purging on logout if (!isset($no_override['logout_purge'])) { $field_id = 'rcmfd_logout_purge'; diff --git a/program/steps/settings/save_prefs.inc b/program/steps/settings/save_prefs.inc index 4af4a3f8f..f521f4f34 100644 --- a/program/steps/settings/save_prefs.inc +++ b/program/steps/settings/save_prefs.inc @@ -110,6 +110,7 @@ switch ($CURR_SECTION) 'skip_deleted' => isset($_POST['_skip_deleted']) ? TRUE : FALSE, 'flag_for_deletion' => isset($_POST['_flag_for_deletion']) ? TRUE : FALSE, 'delete_always' => isset($_POST['_delete_always']) ? TRUE : FALSE, + 'delete_junk' => isset($_POST['_delete_junk']) ? TRUE : FALSE, 'logout_purge' => isset($_POST['_logout_purge']) ? TRUE : FALSE, 'logout_expunge' => isset($_POST['_logout_expunge']) ? TRUE : FALSE, ); -- cgit v1.2.3