From ba5bdb79a273c8faac64eff2c45514469c4d5f7a Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Sat, 13 Feb 2010 06:45:24 +0000 Subject: [PATCH] fixed not working listing of groups, after r29189 --- addressbook/inc/class.addressbook_so.inc.php | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/addressbook/inc/class.addressbook_so.inc.php b/addressbook/inc/class.addressbook_so.inc.php index 6c46924e4a..bc56394c22 100755 --- a/addressbook/inc/class.addressbook_so.inc.php +++ b/addressbook/inc/class.addressbook_so.inc.php @@ -605,9 +605,17 @@ class addressbook_so } // Hide deleted items unless type is specifically deleted - if(!is_array($filter)) $filter = array(); - if($filter['tid'] !== self::DELETED_TYPE) { - $filter[] = 'contact_tid != \'' . self::DELETED_TYPE . '\''; + if(!is_array($filter)) $filter = $filter ? (array) $filter : array(); + if($filter['tid'] !== self::DELETED_TYPE) + { + if ($join && strpos($join,'RIGHT JOIN') !== false) // used eg. to search for groups + { + $filter[] = '(contact_tid != \'' . self::DELETED_TYPE . '\' OR contact_tid IS NULL)'; + } + else + { + $filter[] = 'contact_tid != \'' . self::DELETED_TYPE . '\''; + } } $backend =& $this->get_backend(null,$filter['owner']);