summaryrefslogtreecommitdiff
path: root/program/lib/Roundcube/rcube_imap_generic.php
diff options
context:
space:
mode:
authorAleksander Machniak <alec@alec.pl>2013-07-02 14:49:48 +0200
committerAleksander Machniak <alec@alec.pl>2013-07-02 14:49:48 +0200
commited3e51f1b41d818ae757220fd41cdf0b093b20f6 (patch)
treead825a50d48aaa86a1df10b5ec3b3e593d581a4c /program/lib/Roundcube/rcube_imap_generic.php
parent446dbedbf606c61f06846d04f75e03dfbc3fedfd (diff)
Make possible to disable some (broken) IMAP extensions with imap_disable_caps option (#1489184)
Add some notes in INSTALL about broken ESEARCH in uw-imap.
Diffstat (limited to 'program/lib/Roundcube/rcube_imap_generic.php')
-rw-r--r--program/lib/Roundcube/rcube_imap_generic.php8
1 files changed, 8 insertions, 0 deletions
diff --git a/program/lib/Roundcube/rcube_imap_generic.php b/program/lib/Roundcube/rcube_imap_generic.php
index 1928c7094..ae390a0ee 100644
--- a/program/lib/Roundcube/rcube_imap_generic.php
+++ b/program/lib/Roundcube/rcube_imap_generic.php
@@ -715,6 +715,10 @@ class rcube_imap_generic
$auth_method = 'CHECK';
}
+ if (!empty($this->prefs['disabled_caps'])) {
+ $this->prefs['disabled_caps'] = array_map('strtoupper', (array)$this->prefs['disabled_caps']);
+ }
+
$result = false;
// initialize connection
@@ -3686,6 +3690,10 @@ class rcube_imap_generic
$this->capability = explode(' ', strtoupper($str));
+ if (!empty($this->prefs['disabled_caps'])) {
+ $this->capability = array_diff($this->capability, $this->prefs['disabled_caps']);
+ }
+
if (!isset($this->prefs['literal+']) && in_array('LITERAL+', $this->capability)) {
$this->prefs['literal+'] = true;
}