Fix adding and getting attendees from the Appointment object.
authorMichael J. Rubinsky <mrubinsk@horde.org>
Thu, 8 Apr 2010 00:10:58 +0000 (20:10 -0400)
committerMichael M Slusarz <slusarz@curecanti.org>
Thu, 8 Apr 2010 19:27:13 +0000 (13:27 -0600)
Adding attendees should now work when syncing

framework/ActiveSync/lib/Horde/ActiveSync/Message/Appointment.php

index f63df80..9e28da1 100644 (file)
@@ -45,7 +45,7 @@ class Horde_ActiveSync_Message_Appointment extends Horde_ActiveSync_Message_Base
      * from a __get() property.
      */
     public $exceptions = array();
-    public $attendees;
+    public $attendees = array();
     public $categories;
 
     /**
@@ -653,12 +653,8 @@ class Horde_ActiveSync_Message_Appointment extends Horde_ActiveSync_Message_Base
      */
     public function addAttendee($attendee)
     {
-        if (!isset($this->_properties['attendees']) || !is_array($this->_properties['attendees'])) {
-            $this->_properties['attendees'] = array();
-        }
-
         /* Both email and name are REQUIRED if setting an attendee */
-        $this->_properties['attendees'][] = $attendee;
+        $this->attendees[] = $attendee;
     }
 
     /**
@@ -668,7 +664,7 @@ class Horde_ActiveSync_Message_Appointment extends Horde_ActiveSync_Message_Base
      */
     public function getAttendees()
     {
-        return $this->_getAttribute('attendees', array());
+        return $this->attendees;
     }
 
     /**