From ff8b0a508602822fda7c38d772ac3d0f8717f512 Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Tue, 10 Feb 2015 14:49:34 +0000 Subject: [PATCH] fix sql error, if somehow a uid get into org_view attribute --- addressbook/inc/class.addressbook_ui.inc.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/addressbook/inc/class.addressbook_ui.inc.php b/addressbook/inc/class.addressbook_ui.inc.php index 4103e242af..7baf3e3c72 100644 --- a/addressbook/inc/class.addressbook_ui.inc.php +++ b/addressbook/inc/class.addressbook_ui.inc.php @@ -1275,7 +1275,11 @@ class addressbook_ui extends addressbook_bo foreach(explode('|||',$query['org_view']) as $part) { list($name,$value) = explode(':',$part,2); - $query['col_filter'][$name] = $value; + if ($value && ($GLOBALS['egw']->db->get_column_attribute($name, 'egw_addressbook', 'phpgwapi', 'type') || + $GLOBALS['egw']->db->get_column_attribute('contact_'.$name, 'egw_addressbook', 'phpgwapi', 'type'))) + { + $query['col_filter'][$name] = $value; + } } } // translate the select order to the really used over all 3 columns