From a3644638aaf0418598196a870204e0b632a4c8ad Mon Sep 17 00:00:00 2001
From: Thomas Bruederli <thomas@roundcube.net>
Date: Fri, 17 Apr 2015 06:28:40 -0400
Subject: [PATCH] Allow preference sections to define CSS class names

---
 plugins/attachment_reminder/attachment_reminder.php |   10 ++++++----
 1 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/plugins/attachment_reminder/attachment_reminder.php b/plugins/attachment_reminder/attachment_reminder.php
index a215ff5..84cc5f3 100755
--- a/plugins/attachment_reminder/attachment_reminder.php
+++ b/plugins/attachment_reminder/attachment_reminder.php
@@ -22,7 +22,7 @@
  * GNU General Public License for more details.
  *
  * You should have received a copy of the GNU General Public License
- * along with this program.  If not, see <http://www.gnu.org/licenses/>
+ * along with this program. If not, see <http://www.gnu.org/licenses/>
  */
 
 class attachment_reminder extends rcube_plugin
@@ -36,9 +36,11 @@
         $rcmail = rcube::get_instance();
 
         if ($rcmail->task == 'mail' && $rcmail->action == 'compose') {
-            $this->include_script('attachment_reminder.js');
-            $this->add_texts('localization/', array('keywords', 'forgotattachment'));
-            $rcmail->output->add_label('addattachment', 'send');
+            if ($rcmail->config->get('attachment_reminder')) {
+                $this->include_script('attachment_reminder.js');
+                $this->add_texts('localization/', array('keywords', 'forgotattachment'));
+                $rcmail->output->add_label('addattachment', 'send');
+            }
         }
 
         if ($rcmail->task == 'settings') {

--
Gitblit v1.9.1