Add config support for some esoteric IMAP extensions.
authorMichael M Slusarz <slusarz@curecanti.org>
Fri, 19 Dec 2008 18:55:56 +0000 (11:55 -0700)
committerMichael M Slusarz <slusarz@curecanti.org>
Fri, 19 Dec 2008 18:55:56 +0000 (11:55 -0700)
imp/config/servers.php.dist
imp/lib/IMAP.php

index da26af0..89da46c 100644 (file)
  *            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 '_'
index 1f1f341..fd5e4a0 100644 (file)
@@ -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'],
                 );
             }
         }