From 3f6f90f9929b8a4a22479902a3407a0b36ee455c Mon Sep 17 00:00:00 2001 From: Steve Sutton Date: Fri, 4 Nov 2016 12:01:15 -0400 Subject: [PATCH] Update category and amenity for editing events. Need to check for option to be either submit or update for the deleting of amenities or categories if none are set. --- models/admin/events/list.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/models/admin/events/list.php b/models/admin/events/list.php index e1b9955..f90a405 100644 --- a/models/admin/events/list.php +++ b/models/admin/events/list.php @@ -892,7 +892,7 @@ class GlmMembersAdmin_events_list extends GlmDataEvents } // For each category being submitted // Otherwise if this is a submission and there's no categories submitted, so make sure there's none stored - } elseif (isset($_REQUEST['option']) && $_REQUEST['option'] == 'submit') { + } elseif ( isset($_REQUEST['option']) && ( $_REQUEST['option'] === 'submit' || $_REQUEST['option'] === 'update' ) ) { $EventCategories->clearEventCategories($this->eventID); } @@ -971,7 +971,7 @@ class GlmMembersAdmin_events_list extends GlmDataEvents } // For each amenity being submitted // Otherwise if this is a submission and there's no amenities submitted, so make sure there's none stored - } elseif (isset($_REQUEST['option']) && $_REQUEST['option'] == 'submit') { + } elseif (isset($_REQUEST['option']) && ( $_REQUEST['option'] === 'submit' || $_REQUEST['option'] === 'update' ) ) { $EventAmenities->clearEventAmenities($this->eventID); } -- 2.17.1