mirror of
https://gitlab.com/davical-project/davical.git
synced 2026-05-25 02:34:17 +00:00
Make hide_alarm work on bound resources.
This commit is contained in:
parent
8c1100ec26
commit
ea5a7987e4
@ -127,12 +127,15 @@ function component_to_xml( $properties, $item ) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ( isset($properties['calendar-data']) && isset($c->hide_alarm) && $c->hide_alarm && !$request->HavePrivilegeTo('write') ) {
|
||||
dbg_error_log("REPORT","Stripping event alarms for: %s", $item->dav_name );
|
||||
$vcal = new vCalendar($caldav_data);
|
||||
$vcal->ClearComponents('VALARM');
|
||||
$caldav_data = $vcal->Render();
|
||||
|
||||
if ( isset($c->hide_alarm) && $c->hide_alarm ) {
|
||||
$dav_resource = new DAVResource($request->path);
|
||||
if ( isset($properties['calendar-data']) && !$dav_resource->HavePrivilegeTo('write') ) {
|
||||
dbg_error_log("REPORT","Stripping event alarms for: %s", $item->dav_name );
|
||||
$vcal = new vCalendar($caldav_data);
|
||||
$vcal->ClearComponents('VALARM');
|
||||
$caldav_data = $vcal->Render();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user