summaryrefslogtreecommitdiff
path: root/program/steps
diff options
context:
space:
mode:
authorThomas Bruederli <thomas@roundcube.net>2014-08-20 08:30:24 +0200
committerThomas Bruederli <thomas@roundcube.net>2014-08-20 08:30:24 +0200
commit44b47dfb359f8a7412208079202fca0adf741540 (patch)
treec36bea0bd3f0f3c2c45825e4d79d5e3a9e57ca11 /program/steps
parentfb5e2fb96f4cda26936f599f1a15a49afb53178e (diff)
Add config/preference option to disable saving messages in localStorage (#1489979)
Diffstat (limited to 'program/steps')
-rw-r--r--program/steps/mail/compose.inc1
-rw-r--r--program/steps/settings/func.inc14
-rw-r--r--program/steps/settings/save_prefs.inc1
3 files changed, 16 insertions, 0 deletions
diff --git a/program/steps/mail/compose.inc b/program/steps/mail/compose.inc
index a3c8a8a64..1770a1bcb 100644
--- a/program/steps/mail/compose.inc
+++ b/program/steps/mail/compose.inc
@@ -91,6 +91,7 @@ $OUTPUT->set_env('session_id', session_id());
$OUTPUT->set_env('mailbox', $RCMAIL->storage->get_folder());
$OUTPUT->set_env('top_posting', intval($RCMAIL->config->get('reply_mode')) > 0);
$OUTPUT->set_env('recipients_separator', trim($RCMAIL->config->get('recipients_separator', ',')));
+$OUTPUT->set_env('save_localstorage', (bool)$RCMAIL->config->get('compose_save_localstorage'));
$drafts_mbox = $RCMAIL->config->get('drafts_mbox');
$config_show_sig = $RCMAIL->config->get('show_sig', 1);
diff --git a/program/steps/settings/func.inc b/program/steps/settings/func.inc
index 619710f32..0b2039a78 100644
--- a/program/steps/settings/func.inc
+++ b/program/steps/settings/func.inc
@@ -918,6 +918,20 @@ function rcmail_user_prefs($current = null)
);
}
+ if (!isset($no_override['compose_save_localstorage'])) {
+ if (!$current) {
+ continue 2;
+ }
+
+ $field_id = 'rcmfd_compose_save_localstorage';
+ $input = new html_checkbox(array('name' => '_compose_save_localstorage', 'id' => $field_id, 'value' => 1));
+
+ $blocks['advanced']['options']['compose_save_localstorage'] = array(
+ 'title' => html::label($field_id, rcube::Q($RCMAIL->gettext('savelocalstorage'))),
+ 'content' => $input->show($config['compose_save_localstorage']?1:0),
+ );
+ }
+
break;
// Addressbook config
diff --git a/program/steps/settings/save_prefs.inc b/program/steps/settings/save_prefs.inc
index 7a17f21f4..f0ce9c9a3 100644
--- a/program/steps/settings/save_prefs.inc
+++ b/program/steps/settings/save_prefs.inc
@@ -90,6 +90,7 @@ case 'compose':
'default_font_size' => rcube_utils::get_input_value('_default_font_size', rcube_utils::INPUT_POST),
'reply_all_mode' => intval($_POST['_reply_all_mode']),
'forward_attachment' => !empty($_POST['_forward_attachment']),
+ 'compose_save_localstorage' => intval($_POST['_compose_save_localstorage']),
);
break;