mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-07 16:44:20 +01:00
allow to use nextmatch filters in calendar list-view
This commit is contained in:
parent
16598a21ca
commit
59ca017000
@ -687,7 +687,7 @@ class calendar_so
|
||||
* Please Note: a search never returns repeating events more then once AND does not honor start+end date !!!
|
||||
* array: everything is directly used as $where
|
||||
* @param string $params['order'] ='cal_start' column-names plus optional DESC|ASC separted by comma
|
||||
* @param string $params['sql_filter'] sql to be and'ed into query (fully quoted)
|
||||
* @param string|array $params['sql_filter'] sql to be and'ed into query (fully quoted), or usual filter array
|
||||
* @param string|array $params['cols'] what to select, default "$this->repeats_table.*,$this->cal_table.*,cal_start,cal_end,cal_recur_date",
|
||||
* if specified and not false an iterator for the rows is returned
|
||||
* @param string $params['append'] SQL to append to the query before $order, eg. for a GROUP BY clause
|
||||
@ -746,9 +746,16 @@ class calendar_so
|
||||
$private_filter = '(cal_public=1 OR cal_public=0 AND '.$this->db->expression($this->cal_table, array('cal_owner' => $params['private_grants'])) . ')';
|
||||
$where[] = $private_filter;
|
||||
}
|
||||
if (!empty($params['sql_filter']) && is_string($params['sql_filter']))
|
||||
if (!empty($params['sql_filter']))
|
||||
{
|
||||
$where[] = $params['sql_filter'];
|
||||
if (is_string($params['sql_filter']))
|
||||
{
|
||||
$where[] = $params['sql_filter'];
|
||||
}
|
||||
elseif(is_array($params['sql_filter']))
|
||||
{
|
||||
$where = array_merge($where, $params['sql_filter']);
|
||||
}
|
||||
}
|
||||
if ($users)
|
||||
{
|
||||
|
@ -378,9 +378,20 @@ class calendar_uilist extends calendar_ui
|
||||
{
|
||||
$search_params['users'] = explode(',',$this->owner);
|
||||
}
|
||||
if ($params['col_filter'])
|
||||
{
|
||||
$col_filter = array();
|
||||
foreach($params['col_filter'] as $name => $val)
|
||||
{
|
||||
if ($name != 'participants' && (string)$val !== '')
|
||||
{
|
||||
$col_filter[$name] = $val;
|
||||
}
|
||||
}
|
||||
}
|
||||
$rows = $js_integration_data = array();
|
||||
|
||||
foreach((array) $this->bo->search($search_params) as $event)
|
||||
foreach((array) $this->bo->search($search_params, !empty($col_filter) ? $col_filter : null) as $event)
|
||||
{
|
||||
$this->to_client($event);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user