From 2b41a0e07efadd9374115a7fef96d06cb8f41b39 Mon Sep 17 00:00:00 2001
From: Aleksander Machniak <alec@alec.pl>
Date: Wed, 29 Aug 2012 03:46:30 -0400
Subject: [PATCH] Fix quota capability detection so it can be overwritten by a plugin (#1488655)

---
 CHANGELOG                          |    1 +
 program/steps/settings/folders.inc |    4 +++-
 program/steps/mail/func.inc        |    4 +++-
 3 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/CHANGELOG b/CHANGELOG
index ef2775f..9a7fa97 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,6 +1,7 @@
 CHANGELOG Roundcube Webmail
 ===========================
 
+- Fix quota capability detection so it can be overwritten by a plugin (#1488655)
 - Fix identity selection on reply (#1488101)
 - Fix Larry's messages list filter in IE (#1488632)
 - Fix more IE issues by disabling Compat. mode with X-UA-Compatible meta tag (#1488626)
diff --git a/program/steps/mail/func.inc b/program/steps/mail/func.inc
index 0eb8c77..c0a41a3 100644
--- a/program/steps/mail/func.inc
+++ b/program/steps/mail/func.inc
@@ -93,11 +93,13 @@
   // set current mailbox and some other vars in client environment
   $OUTPUT->set_env('mailbox', $mbox_name);
   $OUTPUT->set_env('pagesize', $RCMAIL->storage->get_pagesize());
-  $OUTPUT->set_env('quota', $RCMAIL->storage->get_capability('QUOTA'));
   $OUTPUT->set_env('delimiter', $RCMAIL->storage->get_hierarchy_delimiter());
   $OUTPUT->set_env('threading', $threading);
   $OUTPUT->set_env('threads', $threading || $RCMAIL->storage->get_capability('THREAD'));
   $OUTPUT->set_env('preview_pane_mark_read', $RCMAIL->config->get('preview_pane_mark_read', 0));
+  if ($RCMAIL->storage->get_capability('QUOTA')) {
+    $OUTPUT->set_env('quota', true);
+  }
 
   if ($CONFIG['delete_junk'])
     $OUTPUT->set_env('delete_junk', true);
diff --git a/program/steps/settings/folders.inc b/program/steps/settings/folders.inc
index 2d3a2c3..d299a91 100644
--- a/program/steps/settings/folders.inc
+++ b/program/steps/settings/folders.inc
@@ -414,8 +414,10 @@
 
 $OUTPUT->set_pagetitle(rcube_label('folders'));
 $OUTPUT->include_script('list.js');
-$OUTPUT->set_env('quota', $STORAGE->get_capability('QUOTA'));
 $OUTPUT->set_env('prefix_ns', $STORAGE->get_namespace('prefix'));
+if ($STORAGE->get_capability('QUOTA')) {
+    $OUTPUT->set_env('quota', true);
+}
 
 // add some labels to client
 $OUTPUT->add_label('deletefolderconfirm', 'purgefolderconfirm', 'folderdeleting',

--
Gitblit v1.9.1