deal with cols parameter to search() being an array

This commit is contained in:
Ralf Becker 2011-04-10 13:52:35 +00:00
parent 2c750ac774
commit 51c365d572

View File

@ -511,7 +511,7 @@ class calendar_so
if (!$params['enum_recuring']) if (!$params['enum_recuring'])
{ {
$where[] = "$this->user_table.cal_recur_date=0"; $where[] = "$this->user_table.cal_recur_date=0";
$group_by = 'GROUP BY '.str_replace('cal_start,','',$cols); $group_by = 'GROUP BY '.str_replace('cal_start,','',implode(', ',(array)$cols));
$cols = str_replace('cal_start','MIN(cal_start) AS cal_start',$cols); $cols = str_replace('cal_start','MIN(cal_start) AS cal_start',$cols);
} }
if ($end) $where[] = 'cal_start < '.(int)$end; if ($end) $where[] = 'cal_start < '.(int)$end;