From: Michael J. Rubinsky Date: Wed, 10 Mar 2010 20:15:28 +0000 (-0500) Subject: Need to allow for removing all attendees when using the ajax interface X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=21e05d6c76c43e433187517330f547d251efd64e;p=horde.git Need to allow for removing all attendees when using the ajax interface --- 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