mirror of
https://gitlab.com/davical-project/davical.git
synced 2026-08-31 18:46:02 +00:00
Wrap calendar-specific things for PROPFIND in an IsCalendar() test.
This commit is contained in:
parent
6791421e67
commit
83059270d9
@ -176,13 +176,15 @@ function get_collection_contents( $depth, $collection, $parent_path = null ) {
|
||||
if ( $collection->HavePrivilegeTo('DAV::read', false) ) {
|
||||
dbg_error_log('PROPFIND','Getting collection items: Depth %d, Path: %s', $depth, $bound_from );
|
||||
$privacy_clause = ' ';
|
||||
if ( ! $collection->HavePrivilegeTo('all', false) ) {
|
||||
$privacy_clause = " AND (calendar_item.class != 'PRIVATE' OR calendar_item.class IS NULL) ";
|
||||
}
|
||||
|
||||
$time_limit_clause = ' ';
|
||||
if ( isset($c->hide_older_than) && intval($c->hide_older_than > 0) ) {
|
||||
$time_limit_clause = " AND calendar_item.dtstart > (now() - interval '".intval($c->hide_older_than)." days') ";
|
||||
if ( $collection->IsCalendar() ) {
|
||||
if ( ! $collection->HavePrivilegeTo('all', false) ) {
|
||||
$privacy_clause = " AND (calendar_item.class != 'PRIVATE' OR calendar_item.class IS NULL) ";
|
||||
}
|
||||
|
||||
if ( isset($c->hide_older_than) && intval($c->hide_older_than > 0) ) {
|
||||
$time_limit_clause = " AND calendar_item.dtstart > (now() - interval '".intval($c->hide_older_than)." days') ";
|
||||
}
|
||||
}
|
||||
|
||||
$sql = 'SELECT collection.*, principal.*, calendar_item.*, caldav_data.*, ';
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user