fixed not working listing of groups, after r29189

This commit is contained in:
Ralf Becker 2010-02-13 06:45:24 +00:00
parent 7d1ac84b67
commit ba5bdb79a2

View File

@ -605,9 +605,17 @@ class addressbook_so
} }
// Hide deleted items unless type is specifically deleted // Hide deleted items unless type is specifically deleted
if(!is_array($filter)) $filter = array(); if(!is_array($filter)) $filter = $filter ? (array) $filter : array();
if($filter['tid'] !== self::DELETED_TYPE) { if($filter['tid'] !== self::DELETED_TYPE)
$filter[] = 'contact_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']); $backend =& $this->get_backend(null,$filter['owner']);