summaryrefslogtreecommitdiff
path: root/program/include/rcube_ldap.php
diff options
context:
space:
mode:
authoralecpl <alec@alec.pl>2011-06-01 13:44:51 +0000
committeralecpl <alec@alec.pl>2011-06-01 13:44:51 +0000
commit3cacf941fa30e8c02f3f7aebcc8747036d0d8d20 (patch)
tree3d873bb15f9454b28c3c4a8ba3216421ededdfd4 /program/include/rcube_ldap.php
parent2912de6f9bea6c0491a7bc4321e66637da0a6746 (diff)
- Add popup with basic fields selection for addressbook search
Diffstat (limited to 'program/include/rcube_ldap.php')
-rw-r--r--program/include/rcube_ldap.php15
1 files changed, 7 insertions, 8 deletions
diff --git a/program/include/rcube_ldap.php b/program/include/rcube_ldap.php
index f166fd23a..7f0ea84fa 100644
--- a/program/include/rcube_ldap.php
+++ b/program/include/rcube_ldap.php
@@ -479,21 +479,20 @@ class rcube_ldap extends rcube_addressbook
$filter = '(|';
$wc = !$strict && $this->prop['fuzzy_search'] ? '*' : '';
- if ($fields != '*')
+ if ($fields == '*')
{
// search_fields are required for fulltext search
- if (!$this->prop['search_fields'])
+ if (empty($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)
- $filter .= "($field=$wc" . $this->_quote_string($value) . "$wc)";
+ if (is_array($this->prop['search_fields']))
+ {
+ foreach ($this->prop['search_fields'] as $k => $field)
+ $filter .= "($field=$wc" . $this->_quote_string($value) . "$wc)";
+ }
}
else
{