Fixed problem where the one time entry for a non-date-specific event when accessing...
authorChuck Scott <cscott@gaslightmedia.com>
Fri, 17 Nov 2017 21:32:39 +0000 (16:32 -0500)
committerChuck Scott <cscott@gaslightmedia.com>
Fri, 17 Nov 2017 21:32:39 +0000 (16:32 -0500)
classes/data/dataRegEvent.php

index bc41be2..73e0700 100644 (file)
@@ -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