summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--config/main.inc.php.dist4
-rw-r--r--plugins/subscriptions_option/package.xml4
-rw-r--r--plugins/subscriptions_option/subscriptions_option.php7
-rw-r--r--program/include/rcube_imap.php14
4 files changed, 12 insertions, 17 deletions
diff --git a/config/main.inc.php.dist b/config/main.inc.php.dist
index f5f42d7fb..e0fa933bf 100644
--- a/config/main.inc.php.dist
+++ b/config/main.inc.php.dist
@@ -106,6 +106,10 @@ $rcmail_config['imap_force_caps'] = false;
// Enable this option to force LSUB command usage instead.
$rcmail_config['imap_force_lsub'] = false;
+// Some server configurations (e.g. Courier) doesn't list folders in all namespaces
+// Enable this option to force listing of folders in all namespaces
+$rcmail_config['imap_force_ns'] = false;
+
// IMAP connection timeout, in seconds. Default: 0 (no limit)
$rcmail_config['imap_timeout'] = 0;
diff --git a/plugins/subscriptions_option/package.xml b/plugins/subscriptions_option/package.xml
index 1ecabf711..79d44f8c2 100644
--- a/plugins/subscriptions_option/package.xml
+++ b/plugins/subscriptions_option/package.xml
@@ -23,9 +23,9 @@
<email>ziba@umich.edu</email>
<active>yes</active>
</developer>
- <date>2012-03-05</date>
+ <date>2012-05-21</date>
<version>
- <release>1.2</release>
+ <release>1.3</release>
<api>1.1</api>
</version>
<stability>
diff --git a/plugins/subscriptions_option/subscriptions_option.php b/plugins/subscriptions_option/subscriptions_option.php
index 28f826263..8b27afbdc 100644
--- a/plugins/subscriptions_option/subscriptions_option.php
+++ b/plugins/subscriptions_option/subscriptions_option.php
@@ -74,12 +74,9 @@ class subscriptions_option extends rcube_plugin
function mailboxes_list($args)
{
- $rcmail = rcmail::get_instance();
+ $rcmail = rcmail::get_instance();
if (!$rcmail->config->get('use_subscriptions', true)) {
- $storage = $rcmail->get_storage();
- if ($storage->check_connection()) {
- $args['folders'] = $storage->conn->listMailboxes($args['root'], $args['name']);
- }
+ $args['folders'] = $rcmail->get_storage()->list_folders_direct();
}
return $args;
}
diff --git a/program/include/rcube_imap.php b/program/include/rcube_imap.php
index 20428ccc6..f401f3707 100644
--- a/program/include/rcube_imap.php
+++ b/program/include/rcube_imap.php
@@ -2539,11 +2539,8 @@ class rcube_imap extends rcube_storage
return array();
}
- // #1486796: some server configurations doesn't
- // return folders in all namespaces, we'll try to detect that situation
- // and ask for these namespaces separately
- // @TODO: make this optional
- if ($root == '' && $name == '*') {
+ // #1486796: some server configurations doesn't return folders in all namespaces
+ if ($root == '' && $name == '*' && $config->get('imap_force_ns')) {
$this->list_folders_update($a_folders, ($list_extended ? 'ext-' : '') . 'subscribed');
}
@@ -2673,11 +2670,8 @@ class rcube_imap extends rcube_storage
return array();
}
- // #1486796: some server configurations doesn't
- // return folders in all namespaces, we'll try to detect that situation
- // and ask for these namespaces separately
- // @TODO: make this optional
- if ($root == '' && $name == '*') {
+ // #1486796: some server configurations doesn't return folders in all namespaces
+ if ($root == '' && $name == '*' && $config->get('imap_force_ns')) {
$this->list_folders_update($result);
}