From 21e05d6c76c43e433187517330f547d251efd64e Mon Sep 17 00:00:00 2001 From: "Michael J. Rubinsky" Date: Wed, 10 Mar 2010 15:15:28 -0500 Subject: [PATCH] Need to allow for removing all attendees when using the ajax interface --- kronolith/lib/Event.php | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/kronolith/lib/Event.php b/kronolith/lib/Event.php index 8f64c1103..69d9402a5 100644 --- a/kronolith/lib/Event.php +++ b/kronolith/lib/Event.php @@ -1618,14 +1618,24 @@ abstract class Kronolith_Event $this->status = Horde_Util::getFormData('status', $this->status); // Attendees. + $attendees = Horde_Util::getFormData('attendees'); if (isset($_SESSION['kronolith']['attendees']) && is_array($_SESSION['kronolith']['attendees'])) { $this->attendees = $_SESSION['kronolith']['attendees']; - } - if ($attendees = Horde_Util::getFormData('attendees')) { - $attendees = Kronolith::parseAttendees(trim($attendees)); if ($attendees) { - $this->attendees = $attendees; + if ($attendees = Kronolith::parseAttendees(trim($attendees))) { + $this->attendees = $attendees; + } } + } else { + if ($attendees) { + if ($attendees = Kronolith::parseAttendees(trim($attendees))) { + $this->attendees = $attendees; + } + } else { + $attendees = array(); + } + + $this->attendees = $attendees; } // Resources -- 2.11.0