From 03eb13f11cf7dd695be3aab95b4e39e510169a49 Mon Sep 17 00:00:00 2001 From: thomascube Date: Sun, 17 Jul 2011 19:01:28 +0000 Subject: Small improvements and codestyle --- program/include/rcube_contacts.php | 2 +- program/steps/mail/autocomplete.inc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'program') diff --git a/program/include/rcube_contacts.php b/program/include/rcube_contacts.php index 799d59618..3ad53a6db 100644 --- a/program/include/rcube_contacts.php +++ b/program/include/rcube_contacts.php @@ -300,7 +300,7 @@ class rcube_contacts extends rcube_addressbook } } - foreach ($required as $col) { + foreach (array_intersect($required, $this->table_cols) as $col) { $and_where[] = $this->db->quoteIdentifier($col).' <> '.$this->db->quote(''); } diff --git a/program/steps/mail/autocomplete.inc b/program/steps/mail/autocomplete.inc index fbb61a442..395c0e12b 100644 --- a/program/steps/mail/autocomplete.inc +++ b/program/steps/mail/autocomplete.inc @@ -37,7 +37,7 @@ if ($RCMAIL->action == 'group-expand') { $OUTPUT->command('replace_group_recipients', $gid, join(', ', $members)); } } -else if ($book_types && $search = get_input_value('_search', RCUBE_INPUT_GPC, true)) { +else if ($book_types && ($search = get_input_value('_search', RCUBE_INPUT_GPC, true))) { $contacts = array(); $books_num = count($book_types); -- cgit v1.2.3