From e9f4f4f3b3223e8229efca1ca34aa7f1e76e20b7 Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Fri, 7 Oct 2011 09:05:11 +0000 Subject: [PATCH] if client set an own filter, reset the open-standard filter --- infolog/inc/class.infolog_groupdav.inc.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/infolog/inc/class.infolog_groupdav.inc.php b/infolog/inc/class.infolog_groupdav.inc.php index 5f0b8a18a6..b00093c9e5 100644 --- a/infolog/inc/class.infolog_groupdav.inc.php +++ b/infolog/inc/class.infolog_groupdav.inc.php @@ -262,6 +262,8 @@ class infolog_groupdav extends groupdav_handler { if ($options['filters']) { + $cal_filters_in = $cal_filters; // remember filter, to be able to reset standard open-filter, if client sets own filters + foreach($options['filters'] as $filter) { switch($filter['name']) @@ -298,13 +300,18 @@ class infolog_groupdav extends groupdav_handler if ($this->debug) error_log(__METHOD__."($options[path],...) param-filter='{$filter['attrs']['name']}' not (yet) implemented!"); break; case 'time-range': - $cal_filters[] = $sql = $this->_time_range_filter($filter['attrs']); + $cal_filters[] = $this->_time_range_filter($filter['attrs']); break; default: if ($this->debug) error_log(__METHOD__."($options[path],".array2string($options).",...) unknown filter --> ignored"); break; } } + // if client set an own filter, reset the open-standard filter + if ($cal_filters != $cal_filters_in) + { + $cal_filters['filter'] = str_replace(array('open', 'open-user'), array('own', 'user'), $cal_filters['filter']); + } } // multiget or propfind on a given id //error_log(__FILE__ . __METHOD__ . "multiget of propfind:");