"fix for bug #838: Distributionlist as mail addres: XML Response from server invalid"

This commit is contained in:
Ralf Becker 2007-06-03 09:49:10 +00:00
parent ad013af084
commit 6d04243cd6

View File

@ -290,7 +290,14 @@ class socontacts_sql extends so_sql
if ($search_customfields) // search the custom-fields
{
$join .= $this->extra_join;
}
if (isset($filter['list']))
{
$join .= " JOIN $this->ab2list_table ON $this->table_name.contact_id=$this->ab2list_table.contact_id AND list_id=".(int)$filter['list'];
unset($filter['list']);
}
if ($join)
{
switch(gettype($only_keys))
{
case 'boolean':
@ -322,11 +329,6 @@ class socontacts_sql extends so_sql
unset($filter['owner']);
}
}
if (isset($filter['list']))
{
$join .= " JOIN $this->ab2list_table ON $this->table_name.contact_id=$this->ab2list_table.contact_id AND list_id=".(int)$filter['list'];
unset($filter['list']);
}
$rows =& parent::search($criteria,$only_keys,$order_by,$extra_cols,$wildcard,$empty,$op,$start,$filter,$join,$need_full_no_count);
if ($start === false) $this->total = is_array($rows) ? count($rows) : 0; // so_sql sets total only for $start !== false!