From 52a4b6b5437b7051219b6b35eaee80a21deefc4c Mon Sep 17 00:00:00 2001 From: Aleksander Machniak Date: Wed, 18 Nov 2015 15:21:10 +0100 Subject: [PATCH] Don't search in binary data fields (T844) --- .../lib/rcube_kolab_contacts.php | 25 ++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/plugins/kolab_addressbook/lib/rcube_kolab_contacts.php b/plugins/kolab_addressbook/lib/rcube_kolab_contacts.php index 48e056ce..7ed91cac 100644 --- a/plugins/kolab_addressbook/lib/rcube_kolab_contacts.php +++ b/plugins/kolab_addressbook/lib/rcube_kolab_contacts.php @@ -100,6 +100,29 @@ class rcube_kolab_contacts extends rcube_addressbook private $imap_folder = 'INBOX/Contacts'; private $action; + // list of fields used for searching in "All fields" mode + private $search_fields = array( + 'name', + 'firstname', + 'surname', + 'middlename', + 'prefix', + 'suffix', + 'nickname', + 'jobtitle', + 'organization', + 'department', + 'email', + 'phone', + 'address', + 'profession', + 'manager', + 'assistant', + 'spouse', + 'children', + 'notes', + ); + public function __construct($imap_folder = null) { @@ -417,7 +440,7 @@ class rcube_kolab_contacts extends rcube_addressbook return $result; } else if ($fields == '*') { - $fields = array_keys($this->coltypes); + $fields = $this->search_fields; } if (!is_array($fields))