From 44b47dfb359f8a7412208079202fca0adf741540 Mon Sep 17 00:00:00 2001
From: Thomas Bruederli <thomas@roundcube.net>
Date: Wed, 20 Aug 2014 02:30:24 -0400
Subject: [PATCH] Add config/preference option to disable saving messages in localStorage (#1489979)

---
 program/steps/settings/func.inc |   14 ++++++++++++++
 1 files changed, 14 insertions(+), 0 deletions(-)

diff --git a/program/steps/settings/func.inc b/program/steps/settings/func.inc
index 619710f..0b2039a 100644
--- a/program/steps/settings/func.inc
+++ b/program/steps/settings/func.inc
@@ -918,6 +918,20 @@
                 );
             }
 
+            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

--
Gitblit v1.9.1