From 582e7a7311a21a8fead3e0acc3cfc5b626084777 Mon Sep 17 00:00:00 2001 From: Chuck Scott Date: Wed, 18 Oct 2017 10:12:15 -0400 Subject: [PATCH] Added hasTimes flag to registration class in getEventForRegistration() --- classes/data/dataRegEvent.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/classes/data/dataRegEvent.php b/classes/data/dataRegEvent.php index ec94f45..f5f0902 100644 --- a/classes/data/dataRegEvent.php +++ b/classes/data/dataRegEvent.php @@ -664,6 +664,7 @@ class GlmDataRegistrationsRegEvent extends GlmDataAbstract } else { $this->regEventData['reg_class'][$ck]['times'] = array(); + $this->regEventData['reg_class'][$ck]['hasTimes'] = false; // For each event time foreach ($this->regEventData['reg_time'] as $tk=>$tv) { @@ -684,6 +685,7 @@ class GlmDataRegistrationsRegEvent extends GlmDataAbstract // If it's time to register with this time/rate - Add it to the class data if (time() > $earliestTime && time() < $latestTime) { $this->regEventData['reg_class'][$ck]['times'][$tv['event_time']] = array_merge($tv, $rv); + $this->regEventData['reg_class'][$ck]['hasTimes'] = true; } } @@ -707,6 +709,7 @@ class GlmDataRegistrationsRegEvent extends GlmDataAbstract // If it's time to register with this time/rate - Add it to the class data if (time() > $earliestTime && time() < $latestTime) { $this->regEventData['reg_class'][$ck]['times'][$tv['event_time']] = array_merge($tv, $rv); + $this->regEventData['reg_class'][$ck]['hasTimes'] = true; } } @@ -728,7 +731,7 @@ class GlmDataRegistrationsRegEvent extends GlmDataAbstract // Get rid of all of the recurrence data - No longer needed unset($this->regEventData['recurrences']); - // Get rid of the provided reg_time entries + // Get rid of the provided reg_time entries - No longer needed unset($this->regEventData['reg_time']); // echo "
".print_r($this->regEventData,1)."
";
-- 
2.17.1