~aw/ubuntu/lucid/davical/trunk

« back to all changes in this revision

Viewing changes to inc/caldav-REPORT.php

  • Committer: Bazaar Package Importer
  • Author(s): Andrew McMillan
  • Date: 2009-04-11 00:08:31 UTC
  • Revision ID: james.westby@ubuntu.com-20090411000831-zc97ye8hni3ozfzm
Tags: 0.9.6.3
* General bug fixing.
* Added Italian locale from Alessandro De Zorzi
* Adjust timezone handling in regression testing (Markus Warg).
* Many fixes to caldav-client from Michael Rasmussen.
* Update caldav-client to use direct socket IO from Andres Obrero.
* Added dummy handler for POST CANCEL events for iCal compatibilty (Wolfgang Herget).
* Support usernames with spaces or punctuation.
* Correct errors in handling confidential events.
* Improved response to GET for calendar with a single event.
* Documentation corrections.
* Remove the misguided hide_todo configuration option.
* Fix a bug in hiding alarms.
* Deprecate 'collections_always_exist' config option and restrict it's scope.
* Updated French translation.
* Updated relational integrity constraints.
* Fix database versioning.

Show diffs side-by-side

added added

removed removed

Lines of Context:
80
80
  if ( isset($properties['calendar-data']) || isset($properties['displayname']) ) {
81
81
    if ( !$request->AllowedTo('all') && $session->user_no != $item->user_no ){
82
82
      // the user is not admin / owner of this calendarlooking at his calendar and can not admin the other cal
83
 
      /** @todo We should examine the ORGANIZER and ATTENDEE fields in the event.  If this person is there then they should see this, and perhaps get alarms also */
 
83
      /** @todo We should examine the ORGANIZER and ATTENDEE fields in the event.  If this person is there then they should see this */
84
84
      if ( $item->class == 'CONFIDENTIAL' ) {
85
85
        $ical = new iCalComponent( $caldav_data );
86
86
        $resources = $ical->GetComponents('VTIMEZONE',false);
95
95
        $confidential->SetProperties( $first->GetProperties('RRULE'), 'RRULE' );
96
96
        $confidential->SetProperties( $first->GetProperties('DURATION'), 'DURATION' );
97
97
        $confidential->SetProperties( $first->GetProperties('DTEND'), 'DTEND' );
 
98
        $confidential->SetProperties( $first->GetProperties('UID'), 'UID' );
98
99
        $ical->SetComponents(array($confidential),$confidential->GetType());
99
100
 
100
101
        $caldav_data = $ical->Render();
101
102
      }
102
 
      elseif ( isset($c->hide_alarm) && $c->hide_alarm ) {
103
 
        // Otherwise we hide the alarms (if configured to)
104
 
        $ical = new iCalComponent( $caldav_data );
105
 
        $timezones = $ical->GetComponents('VTIMEZONE',true);
106
 
        $resources = $ical->GetComponents('VTIMEZONE',false);
107
 
        foreach( $resources AS $k => $v ) {
108
 
          $v->ClearComponents('VALARM');
109
 
        }
110
 
        $ical->SetComponents($timezones + $resources);
111
 
        $caldav_data = $ical->render(true, $caldav_type );
112
 
      }
113
103
    }
114
104
  }
115
105