From 9433868b5e00017216f959264122cfba413ad61c Mon Sep 17 00:00:00 2001 From: "Michael J. Rubinsky" Date: Tue, 11 May 2010 15:18:03 -0400 Subject: [PATCH] Use the constants instead of translating --- .../lib/Horde/ActiveSync/Message/Appointment.php | 42 ++-------------------- 1 file changed, 3 insertions(+), 39 deletions(-) diff --git a/framework/ActiveSync/lib/Horde/ActiveSync/Message/Appointment.php b/framework/ActiveSync/lib/Horde/ActiveSync/Message/Appointment.php index e83487d22..d4a4fa76e 100644 --- a/framework/ActiveSync/lib/Horde/ActiveSync/Message/Appointment.php +++ b/framework/ActiveSync/lib/Horde/ActiveSync/Message/Appointment.php @@ -520,57 +520,21 @@ class Horde_ActiveSync_Message_Appointment extends Horde_ActiveSync_Message_Base /** * Sets the busy status for this appointment * - * Should be one of: - * free, tentative, busy, out - * - * - * @param string $busy The busy status to use + * @param integer $busy The BUSYSTATUS constant */ public function setBusyStatus($busy) { - switch ($busy) { - case 'free': - $busy = self::BUSYSTATUS_FREE; - break; - case 'tentative': - $busy = self::BUSYSTATUS_TENTATIVE; - break; - case 'busy': - $busy = self::BUSYSTATUS_BUSY; - break; - case 'out': - $busy = self::BUSYSTATUS_OUT; - break; - default: - return; - } - $this->_properties['busystatus'] = $busy; } /** * Return the busy status for this appointment. * - * @return string One of free, tentative, busy, out + * @return integer The BUSYSTATUS constant */ public function getBusyStatus() { - switch ($this->_getAttribute('busystatus')) { - case self::BUSYSTATUS_FREE: - return 'free'; - break; - case self::BUSYSTATUS_TENTATIVE: - return 'tentative'; - break; - case self::BUSYSTATUS_BUSY: - return 'busy'; - break; - case self::BUSYSTATUS_OUT: - return 'out'; - break; - default: - return; - } + return $this->_getAttribute('busystatus'); } /** -- 2.11.0