From c5f77ca9826ac6dad866098f9c921876adebc993 Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Fri, 10 Sep 2010 19:12:59 +0000 Subject: [PATCH] new param $sql_filter for search() --- calendar/inc/class.calendar_bo.inc.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/calendar/inc/class.calendar_bo.inc.php b/calendar/inc/class.calendar_bo.inc.php index 9b0a8cd5c9..5982e3d1ce 100644 --- a/calendar/inc/class.calendar_bo.inc.php +++ b/calendar/inc/class.calendar_bo.inc.php @@ -316,14 +316,15 @@ class calendar_bo * cols string|array columns to select, if set an iterator will be returned * append string to append to the query, eg. GROUP BY * cfs array if set, query given custom fields or all for empty array, none are returned, if not set (default) + * @param string $sql_filter=null sql to be and'ed into query (fully quoted), default none * @return iterator|array|boolean array of events or array with YYYYMMDD strings / array of events pairs (depending on $daywise param) * or false if there are no read-grants from _any_ of the requested users or iterator/recordset if cols are given */ - function &search($params) + function &search($params,$sql_filter=null) { $params_in = $params; - unset($params['sql_filter']); // dont allow to set it via UI or xmlrpc + $params['sql_filter'] = $sql_filter; // dont allow to set it via UI or xmlrpc // check if any resource wants to hook into foreach($this->resources as $app => $data)