mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-08 17:14:44 +01:00
* 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:
parent
9a633cab48
commit
e87c0dfb1a
@ -1145,6 +1145,18 @@ class so_sql
|
|||||||
if (!is_array($columns))
|
if (!is_array($columns))
|
||||||
{
|
{
|
||||||
$columns = preg_split('/, */', $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)
|
foreach($columns as $n => $col)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user