From 077f432d6c01cbeb68feb37e13011ac17e6b66be Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Thu, 12 Jul 2007 09:58:17 +0000 Subject: [PATCH] fixed sql error if an addressbook get selected in the extended search --- addressbook/inc/class.socontacts_sql.inc.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/addressbook/inc/class.socontacts_sql.inc.php b/addressbook/inc/class.socontacts_sql.inc.php index 7b9e0e43b1..706141a162 100644 --- a/addressbook/inc/class.socontacts_sql.inc.php +++ b/addressbook/inc/class.socontacts_sql.inc.php @@ -335,6 +335,11 @@ class socontacts_sql extends so_sql $filter[] = $this->table_name.'.contact_owner='.(int)$filter['owner']; unset($filter['owner']); } + if (isset($criteria['owner'])) + { + $criteria[] = $this->table_name.'.contact_owner='.(int)$criteria['owner']; + unset($criteria['owner']); + } // postgres requires that expressions in order by appear in the columns of a distinct select if ($this->db->Type != 'mysql' && preg_match("/(\w+<>'')/",$order_by,$matches)) {