mirror of
https://gitlab.com/davical-project/davical.git
synced 2026-03-13 08:00:15 +00:00
Scrub confidential events more thoroughly.
This commit is contained in:
parent
601e7bc12f
commit
5f2a55bcf5
@ -61,9 +61,13 @@ else if ( $qry->rows > 1 ) {
|
||||
// the user is not admin / owner of this calendarlooking at his calendar and can not admin the other cal
|
||||
if ( $event->class == 'CONFIDENTIAL' ) {
|
||||
// if the event is confidential we fake one that just says "Busy"
|
||||
$displayname = translate("Busy");
|
||||
$ical->Put( 'SUMMARY', $displayname );
|
||||
$response .= $ical->Render( false, $event->caldav_type, $ical->DefaultPropertyList() );
|
||||
$confidential = new iCalendar( array(
|
||||
'SUMMARY' => translate('Busy'), 'CLASS' => 'CONFIDENTIAL',
|
||||
'DTSTART' => $ical->Get('DTSTART'),
|
||||
'DURATION' => $ical->Get('DURATION'),
|
||||
'RRULE' => $ical->Get('RRULE')
|
||||
) );
|
||||
$response .= $confidential->Render( false, $event->caldav_type );
|
||||
}
|
||||
elseif ( $c->hide_alarm ) {
|
||||
// Otherwise we hide the alarms (if configured to)
|
||||
@ -89,4 +93,3 @@ else {
|
||||
$request->DoResponse( 500, translate("Database Error") );
|
||||
}
|
||||
|
||||
?>
|
||||
@ -72,10 +72,13 @@ function calendar_to_xml( $properties, $item ) {
|
||||
// the user is not admin / owner of this calendarlooking at his calendar and can not admin the other cal
|
||||
if ( $item->class == 'CONFIDENTIAL' ) {
|
||||
// if the event is confidential we fake one that just says "Busy"
|
||||
$displayname = translate("Busy");
|
||||
$ical = new iCalendar( array( "icalendar" => $caldav_data) );
|
||||
$ical->Put( 'SUMMARY', $displayname );
|
||||
$caldav_data = $ical->render(true, $caldav_type, $ical->DefaultPropertyList() );
|
||||
$confidential = new iCalendar( array(
|
||||
'SUMMARY' => translate('Busy'), 'CLASS' => 'CONFIDENTIAL',
|
||||
'DTSTART' => $ical->Get('DTSTART'),
|
||||
'DURATION' => $ical->Get('DURATION'),
|
||||
'RRULE' => $ical->Get('RRULE')
|
||||
) );
|
||||
$caldav_data = $confidential->Render( true, $caldav_type );
|
||||
}
|
||||
elseif ( $c->hide_alarm ) {
|
||||
// Otherwise we hide the alarms (if configured to)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user