mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-06-23 19:31:53 +02:00
"fix for bug #928: Distribution lists are not working with pgsql, thanks to Peter Eisentraut <peter_e-at-gmx.net>
postgres requires that expressions in order by appear in the columns of a distinct select"
This commit is contained in:
parent
8f1f3f68cb
commit
f9023da5e2
@ -328,6 +328,12 @@ class socontacts_sql extends so_sql
|
|||||||
$filter[] = $this->table_name.'.contact_owner='.(int)$filter['owner'];
|
$filter[] = $this->table_name.'.contact_owner='.(int)$filter['owner'];
|
||||||
unset($filter['owner']);
|
unset($filter['owner']);
|
||||||
}
|
}
|
||||||
|
// postgres requires that expressions in order by appear in the columns of a distinct select
|
||||||
|
if ($this->db->Type != 'mysql' && preg_match("/(\w+<>'')/",$order_by,$matches))
|
||||||
|
{
|
||||||
|
if (!is_array($extra_cols)) $extra_cols = $extra_cols ? explode(',',$extra_cols) : array();
|
||||||
|
$extra_cols[] = $matches[1];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
$rows =& parent::search($criteria,$only_keys,$order_by,$extra_cols,$wildcard,$empty,$op,$start,$filter,$join,$need_full_no_count);
|
$rows =& parent::search($criteria,$only_keys,$order_by,$extra_cols,$wildcard,$empty,$op,$start,$filter,$join,$need_full_no_count);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user