* addressbook: postgres compatibility for distributionlists

This commit is contained in:
Klaus Leithoff 2011-01-14 12:58:46 +00:00
parent fa065bb3c9
commit 93a07c2ff4

View File

@ -360,6 +360,12 @@ class addressbook_sql extends so_sql_cf
$table = $matches[1] == $this->extra_value ? $this->extra_table : $this->table_name;
$extra_cols[] = $table.'.'.$matches[1];
$extra_cols[] = $table.'.'.$matches[1]."<>''";
//_debug_array($matches[1]);
if (!empty($order_by) && $matches[1] != 'extra_order.contact_value' && stripos($matches[1],'.')===false) // postgres requires explizit order by
{
$order_by = str_replace($matches[1],'egw_addressbook.'.$matches[1],$order_by);
}
//_debug_array($order_by);
}
}
// add join to show only active accounts (only if accounts are shown and in sql and we not already join the accounts table, eg. used by admin)