From 3cacf941fa30e8c02f3f7aebcc8747036d0d8d20 Mon Sep 17 00:00:00 2001 From: alecpl Date: Wed, 1 Jun 2011 13:44:51 +0000 Subject: - Add popup with basic fields selection for addressbook search --- program/include/rcube_ldap.php | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) (limited to 'program/include/rcube_ldap.php') 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 { -- cgit v1.2.3