From df6f57806a10a9f6a376b16209f54b7bef12c6bb Mon Sep 17 00:00:00 2001 From: Chuck Scott Date: Fri, 17 Nov 2017 16:32:39 -0500 Subject: [PATCH] Fixed problem where the one time entry for a non-date-specific event when accessing the dashboard for that event. --- classes/data/dataRegEvent.php | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/classes/data/dataRegEvent.php b/classes/data/dataRegEvent.php index bc41be2..73e0700 100644 --- a/classes/data/dataRegEvent.php +++ b/classes/data/dataRegEvent.php @@ -932,17 +932,22 @@ class GlmDataRegistrationsRegEvent extends GlmDataAbstract } // each recurrence - // Check all reg_times we had from before to make sure they were matched with a recur time - $deleteList = ''; - $deleteSep = ''; - foreach($this->regEventData['reg_time'] as $regTimeKey=>$regTimeVal) { - if (!isset($regTimeVal['OK'])) { + // If this is a time specific event + if ($this->regEventData['time_specific']['value']) { + + // Check all reg_times we had from before to make sure they were matched with a recur time + $deleteList = ''; + $deleteSep = ''; + foreach($this->regEventData['reg_time'] as $regTimeKey=>$regTimeVal) { + if (!isset($regTimeVal['OK'])) { - // If this time didn't match a recur time, then it must have been removed in the event so add to list - $deleteList .= $deleteSep.$regTimeKey; - $deleteSep = ','; + // If this time didn't match a recur time, then it must have been removed in the event so add to list + $deleteList .= $deleteSep.$regTimeKey; + $deleteSep = ','; + } } + } // If there's anything in the delete list, purge them now and say we need a reload -- 2.17.1