From ed3e51f1b41d818ae757220fd41cdf0b093b20f6 Mon Sep 17 00:00:00 2001 From: Aleksander Machniak Date: Tue, 2 Jul 2013 14:49:48 +0200 Subject: 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. --- program/lib/Roundcube/rcube_imap_generic.php | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'program/lib/Roundcube/rcube_imap_generic.php') 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; } -- cgit v1.2.3