From: Chuck Scott Date: Wed, 18 Oct 2017 14:12:15 +0000 (-0400) Subject: Added hasTimes flag to registration class in getEventForRegistration() X-Git-Tag: v1.0.0^2~344 X-Git-Url: http://cvs2.gaslightmedia.com/gitweb/index.cgi?a=commitdiff_plain;h=582e7a7311a21a8fead3e0acc3cfc5b626084777;p=WP-Plugins%2Fglm-member-db-registrations.git Added hasTimes flag to registration class in getEventForRegistration() --- 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)."
";