mirror of
https://gitlab.com/davical-project/davical.git
synced 2026-05-25 02:34:17 +00:00
This commit is contained in:
parent
1c174f4b78
commit
8052111635
@ -217,7 +217,7 @@ function get_collection_contents( $depth, $collection, $parent_path = null ) {
|
||||
}
|
||||
|
||||
if ( isset($c->hide_older_than) && intval($c->hide_older_than > 0) ) {
|
||||
$time_limit_clause = " AND (CASE WHEN caldav_data.caldav_type<>'VEVENT' OR calendar_item.dtstart IS NULL THEN true ELSE calendar_item.dtstart > (now() - interval '".intval($c->hide_older_than)." days') END) ";
|
||||
$time_limit_clause = " AND (CASE WHEN caldav_data.caldav_type<>'VEVENT' OR calendar_item.dtstart IS NULL OR calendar_item.rrule IS NOT NULL THEN true ELSE calendar_item.dtstart > (now() - interval '".intval($c->hide_older_than)." days') END) ";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -325,7 +325,7 @@ if ( isset($c->hide_TODO) && ($c->hide_TODO === true || (is_string($c->hide_TODO
|
||||
}
|
||||
|
||||
if ( isset($c->hide_older_than) && intval($c->hide_older_than > 0) ) {
|
||||
$where .= " AND (CASE WHEN caldav_data.caldav_type<>'VEVENT' OR calendar_item.dtstart IS NULL THEN true ELSE calendar_item.dtstart > (now() - interval '".intval($c->hide_older_than)." days') END) ";
|
||||
$where .= " AND (CASE WHEN caldav_data.caldav_type<>'VEVENT' OR calendar_item.dtstart IS NULL OR calendar_item.rrule IS NOT NULL THEN true ELSE calendar_item.dtstart > (now() - interval '".intval($c->hide_older_than)." days') END) ";
|
||||
}
|
||||
|
||||
$sql = 'SELECT '.$distinct.' caldav_data.*,calendar_item.* FROM collection INNER JOIN caldav_data USING(collection_id) INNER JOIN calendar_item USING(dav_id) '. $where;
|
||||
|
||||
@ -82,7 +82,7 @@ if ( $sync_token == $new_token ) {
|
||||
else {
|
||||
$hide_older = '';
|
||||
if ( isset($c->hide_older_than) && intval($c->hide_older_than) > 0 )
|
||||
$hide_older = " AND (CASE WHEN caldav_data.caldav_type<>'VEVENT' OR calendar_item.dtstart IS NULL THEN true ELSE calendar_item.dtstart > (now() - interval '".intval($c->hide_older_than)." days') END)";
|
||||
$hide_older = " AND (CASE WHEN caldav_data.caldav_type<>'VEVENT' OR calendar_item.dtstart IS NULL OR calendar_item.rrule IS NOT NULL THEN true ELSE calendar_item.dtstart > (now() - interval '".intval($c->hide_older_than)." days') END)";
|
||||
|
||||
$hide_todo = '';
|
||||
if ( isset($c->hide_TODO) && ($c->hide_TODO === true || (is_string($c->hide_TODO) && preg_match($c->hide_TODO, $_SERVER['HTTP_USER_AGENT']))) && ! $collection->HavePrivilegeTo('all') )
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user