When creating a fake event, don't create a blank RRULE.

This commit is contained in:
Andrew McMillan 2008-02-09 21:20:55 +13:00
parent 1afbfc4974
commit a059beb833
2 changed files with 6 additions and 4 deletions

View File

@ -61,9 +61,10 @@ else if ( $qry->rows > 1 ) {
// if the event is confidential we fake one that just says "Busy" // if the event is confidential we fake one that just says "Busy"
$confidential = new iCalendar( array( $confidential = new iCalendar( array(
'SUMMARY' => translate('Busy'), 'CLASS' => 'CONFIDENTIAL', 'SUMMARY' => translate('Busy'), 'CLASS' => 'CONFIDENTIAL',
'DTSTART' => $ical->Get('DTSTART'), 'DTSTART' => $ical->Get('DTSTART')
'RRULE' => $ical->Get('RRULE')
) ); ) );
$rrule = $ical->Get('RRULE');
if ( isset($rrule) && $rrule != '' ) $confidential->Set('RRULE', $rrule);
$duration = $ical->Get('DURATION'); $duration = $ical->Get('DURATION');
if ( isset($duration) && $duration != "" ) { if ( isset($duration) && $duration != "" ) {
$confidential->Set('DURATION', $duration ); $confidential->Set('DURATION', $duration );

View File

@ -77,9 +77,10 @@ function calendar_to_xml( $properties, $item ) {
// if the event is confidential we fake one that just says "Busy" // if the event is confidential we fake one that just says "Busy"
$confidential = new iCalendar( array( $confidential = new iCalendar( array(
'SUMMARY' => translate('Busy'), 'CLASS' => 'CONFIDENTIAL', 'SUMMARY' => translate('Busy'), 'CLASS' => 'CONFIDENTIAL',
'DTSTART' => $ical->Get('DTSTART'), 'DTSTART' => $ical->Get('DTSTART')
'RRULE' => $ical->Get('RRULE')
) ); ) );
$rrule = $ical->Get('RRULE');
if ( isset($rrule) && $rrule != '' ) $confidential->Set('RRULE', $rrule);
$duration = $ical->Get('DURATION'); $duration = $ical->Get('DURATION');
if ( isset($duration) && $duration != "" ) { if ( isset($duration) && $duration != "" ) {
$confidential->Set('DURATION', $duration ); $confidential->Set('DURATION', $duration );