mirror of
https://gitlab.com/davical-project/davical.git
synced 2026-06-10 05:10:19 +00:00
Add the $c->hide_alarms functionality into DAVResource class.
This commit is contained in:
parent
3cc3396d67
commit
02b6d47082
@ -283,6 +283,17 @@ class DAVResource
|
||||
$this->resource->location = null;
|
||||
$this->resource->url = null;
|
||||
}
|
||||
else if ( isset($c->hide_alarms) && $c->hide_alarms && !$this->HavePrivilegeTo('write') ) {
|
||||
$vcal1 = new iCalComponent($this->resource->caldav_data);
|
||||
$comps = $vcal1->GetComponents();
|
||||
$vcal2 = new iCalComponent();
|
||||
$vcal2->VCalendar();
|
||||
foreach( $comps AS $comp ) {
|
||||
$comp->ClearComponents('VALARM');
|
||||
$vcal2->AddComponent($comp);
|
||||
}
|
||||
$this->resource->caldav_data = $vcal2->Render();
|
||||
}
|
||||
}
|
||||
else if ( strtoupper(substr($this->resource->caldav_data,0,11)) == 'BEGIN:VCARD' ) {
|
||||
$this->contenttype = 'text/vcard';
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user