From a0530a6ec0cb464ec6eaa63fd211c2ffbe6db9ad Mon Sep 17 00:00:00 2001
From: alecpl <alec@alec.pl>
Date: Sun, 08 Jun 2008 14:17:09 -0400
Subject: [PATCH] - option to disable autocompletion from selected LDAP address books (#1484922
---
CHANGELOG | 4 ++++
program/steps/mail/compose.inc | 9 ++++++---
config/main.inc.php.dist | 1 +
3 files changed, 11 insertions(+), 3 deletions(-)
diff --git a/CHANGELOG b/CHANGELOG
index 40a538c..63bf46c 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,6 +1,10 @@
CHANGELOG RoundCube Webmail
---------------------------
+2008/06/08 (alec)
+----------
+- Added option to disable autocompletion from selected LDAP address books (#1484922)
+
2008/06/07 (thomasb)
----------
- Cleaned up localization names. Now named with lang_COUNTRY according to ISO 639-1/3166-1
diff --git a/config/main.inc.php.dist b/config/main.inc.php.dist
index 8d71d8f..0be6d47 100644
--- a/config/main.inc.php.dist
+++ b/config/main.inc.php.dist
@@ -271,6 +271,7 @@
* 'sort' => 'cn', // The field to sort the listing by.
* 'scope' => 'sub', // search mode: sub|base|list
* 'filter' => '', // used for basic listing (if not empty) and will be &'d with search queries. example: status=act
+ * 'global_search' => true, // perform a global search for address auto-completion on compose
* 'fuzzy_search' => true); // server allows wildcard search
*/
diff --git a/program/steps/mail/compose.inc b/program/steps/mail/compose.inc
index c56bbd5..855066b 100644
--- a/program/steps/mail/compose.inc
+++ b/program/steps/mail/compose.inc
@@ -829,10 +829,11 @@
/* LDAP autocompletion */
foreach ($CONFIG['ldap_public'] as $ldapserv_config)
{
- if ($ldapserv_config['fuzzy_search'] != 1)
+ if ($ldapserv_config['fuzzy_search'] != 1 ||
+ $ldapserv_config['global_search'] != 1)
{
continue;
- }
+ }
$LDAP = new rcube_ldap($ldapserv_config);
$LDAP->connect();
@@ -856,6 +857,8 @@
if ($a_contacts)
{
$OUTPUT->set_env('contacts', $a_contacts);
- }
+ }
+
$OUTPUT->send('compose');
+
?>
--
Gitblit v1.9.1