From: Michael J. Rubinsky Date: Thu, 8 Apr 2010 14:34:09 +0000 (-0400) Subject: Fill in the remaining properties for event exceptions - and add missing support for... X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=a8e08aaa9419468c1f6fc49ffb9cfc3131f1e666;p=horde.git Fill in the remaining properties for event exceptions - and add missing support for the body (kronolith's Notes field) element. --- diff --git a/framework/ActiveSync/lib/Horde/ActiveSync/Message/Appointment.php b/framework/ActiveSync/lib/Horde/ActiveSync/Message/Appointment.php index 9e28da1ca..4f195b92a 100644 --- a/framework/ActiveSync/lib/Horde/ActiveSync/Message/Appointment.php +++ b/framework/ActiveSync/lib/Horde/ActiveSync/Message/Appointment.php @@ -668,18 +668,23 @@ class Horde_ActiveSync_Message_Appointment extends Horde_ActiveSync_Message_Base } /** - * TODO + * Set the appointment's body * - * @param $body + * @param string $body UTF-8 encoded string */ public function setBody($body) { - + $this->_properties['body'] = $body; } + /** + * Get the appointment's body + * + * @return string UTF-8 encoded string + */ public function getBody() { - + return $this->_getAttribute('body'); } /** diff --git a/kronolith/lib/Event.php b/kronolith/lib/Event.php index a1c8eae3e..5fae8bd4b 100644 --- a/kronolith/lib/Event.php +++ b/kronolith/lib/Event.php @@ -1171,7 +1171,33 @@ abstract class Kronolith_Event if ($key !== false) { unset($exceptions[$key]); } + + /* Remaining properties that could be different */ + $e->setSubject(Horde_String::convertCharset($exception->getTitle(), Horde_Nls::getCharset(), 'utf-8')); + $e->setLocation(Horde_String::convertCharset($exception->location, Horde_Nls::getCharset(), 'utf-8')); + $e->setBody(Horde_String::convertCharset($exception->description, Horde_Nls::getCharset(), 'utf-8')); + + $e->setSensitivity($exception->private ? 'private' : 'normal'); + $e->setReminder($exception->alarm); + $e->setDTStamp($_SERVER['REQUEST_TIME']); + /* Response Status */ + switch ($exception->status) { + case Kronolith::STATUS_CANCELLED: + $status = 'declined'; + break; + case Kronolith::STATUS_CONFIRMED: + $status = 'accepted'; + break; + case Kronolith::STATUS_TENTATIVE: + $status = 'tenative'; + case Kronolith::STATUS_FREE: + case Kronolith::STATUS_NONE: + $status = 'none'; + } + $e->setResponseType($status); + $message->addexception($e); + } }