From: Steve Sutton Date: Fri, 4 Nov 2016 16:01:15 +0000 (-0400) Subject: Update category and amenity for editing events. X-Git-Tag: v1.5.4^2~25 X-Git-Url: http://cvs2.gaslightmedia.com/gitweb/index.cgi?a=commitdiff_plain;h=3f6f90f9929b8a4a22479902a3407a0b36ee455c;p=WP-Plugins%2Fglm-member-db-events.git 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. --- 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); }