From 5b7b0247bda4c316881a094f96fba0c4e7564b7c Mon Sep 17 00:00:00 2001 From: Michael M Slusarz Date: Fri, 19 Dec 2008 11:55:56 -0700 Subject: [PATCH] Add config support for some esoteric IMAP extensions. --- imp/config/servers.php.dist | 18 ++++++++++++++++++ imp/lib/IMAP.php | 9 ++++++--- 2 files changed, 24 insertions(+), 3 deletions(-) diff --git a/imp/config/servers.php.dist b/imp/config/servers.php.dist index da26af07d..89da46cf7 100644 --- a/imp/config/servers.php.dist +++ b/imp/config/servers.php.dist @@ -180,6 +180,24 @@ * server. This entry is only pertinent for IMAP servers. * * timeout: (integer) Set the server timeout (in seconds). + * + * comparator: (string) The search comparator to use instead of the default + * IMAP server comparator. See RFC 4790 [3.1] - "collation-id" - + * for the format. Your IMAP server must support the I18NLEVEL + * extension for this setting to have an effect. By default, + * the server default comparator is used. + * + * id: (array) Send ID information to the IMAP server. This must be a an array + * with the keys being the fields to send and the values being the + * associated values. Your IMAP server must support the ID extension for + * this setting to have an effect. See RFC 2971 [3.3] for a list of + * defined field values. + * + * lang: (array) A list of languages (in priority order) to be used to display + * display human readable messages returned by the IMAP server. Your + * IMAP server must support the LANGUAGE extensions for this setting to + * have an effect. By default, IMAP messages are output in the IMAP + * server default language. */ /* Any entries whose key value ('foo' in $servers['foo']) begin with '_' diff --git a/imp/lib/IMAP.php b/imp/lib/IMAP.php index 1f1f341c4..fd5e4a0ca 100644 --- a/imp/lib/IMAP.php +++ b/imp/lib/IMAP.php @@ -172,11 +172,14 @@ class IMP_IMAP $driver = $GLOBALS['conf']['cache']['driver']; if ($driver != 'none') { $imap_config['cache'] = array( - 'compress' => !empty($c['compress']) ? $c['compress'] : false, + 'comparator' => empty($c['comparator']) ? false : $c['comparator'], + 'compress' => empty($c['compress']) ? false : $c['compress'], 'driver' => $driver, 'driver_params' => Horde::getDriverConfig('cache', $driver), - 'lifetime' => !empty($c['lifetime']) ? $c['lifetime'] : false, - 'slicesize' => !empty($c['slicesize']) ? $c['slicesize'] : false + 'id' => empty($c['id']) ? false : $c['id'], + 'lang' => empty($c['lang']) ? false : $c['lang'], + 'lifetime' => empty($c['lifetime']) ? false : $c['lifetime'], + 'slicesize' => empty($c['slicesize']) ? false : $c['slicesize'], ); } } -- 2.11.0