* ProjectManager/PostgreSQL: fix SQL error in project-list caused by new resources column

fix columns containing commas as part of function calls getting split incorrect in fix_group_by_columns
This commit is contained in:
Ralf Becker 2015-02-16 10:22:23 +00:00
parent 9a633cab48
commit e87c0dfb1a

View File

@ -1145,6 +1145,18 @@ class so_sql
if (!is_array($columns))
{
$columns = preg_split('/, */', $columns);
// fix columns containing commas as part of function calls
for($n = 0; $n < count($columns); ++$n)
{
$col =& $columns[$n];
while (substr_count($col, '(') > substr_count($col, ')') && ++$n < count($columns))
{
$col .= ','.$columns[$n];
unset($columns[$n]);
}
}
unset($col);
}
foreach($columns as $n => $col)
{