summaryrefslogtreecommitdiff
path: root/program/include/rcube_ldap.php
diff options
context:
space:
mode:
authorthomascube <thomas@roundcube.net>2011-02-14 20:46:48 +0000
committerthomascube <thomas@roundcube.net>2011-02-14 20:46:48 +0000
commit3e2637351da9559a4aa420004ac90e9fe30477ef (patch)
treeca7f99df5bba9fc2bf63ab3bb14566dfffa3b607 /program/include/rcube_ldap.php
parentfc2d3de7691a9b1d083eed435c2c327c2b8edbaa (diff)
Fulltext search over contact fields. Attention: DATABASE SCHEMA CHANGED\!
Diffstat (limited to 'program/include/rcube_ldap.php')
-rw-r--r--program/include/rcube_ldap.php11
1 files changed, 11 insertions, 0 deletions
diff --git a/program/include/rcube_ldap.php b/program/include/rcube_ldap.php
index 9c9973f25..3cb47480a 100644
--- a/program/include/rcube_ldap.php
+++ b/program/include/rcube_ldap.php
@@ -407,6 +407,17 @@ class rcube_ldap extends rcube_addressbook
$filter = '(|';
$wc = !$strict && $this->prop['fuzzy_search'] ? '*' : '';
+ if ($fields != '*')
+ {
+ // search_fields are required for fulltext search
+ if (!$this->prop['search_fields'])
+ {
+ $this->set_error(self::ERROR_SEARCH, 'nofulltextsearch');
+ $this->result = new rcube_result_set();
+ return $this->result;
+ }
+ }
+
if (is_array($this->prop['search_fields']))
{
foreach ($this->prop['search_fields'] as $k => $field)