Fixed bug when creating a reg event that caused default parameters to be wrong.
authorChuck Scott <cscott@gaslightmedia.com>
Fri, 29 Dec 2017 15:46:15 +0000 (10:46 -0500)
committerChuck Scott <cscott@gaslightmedia.com>
Fri, 29 Dec 2017 15:46:15 +0000 (10:46 -0500)
fixed query in add/edit reg event where adding a new event.
Updated default values in dataRegEvent.php (which are actually not used currently)

classes/data/dataRegEvent.php
models/admin/registrations/events.php

index fbe6353..1bba620 100644 (file)
@@ -198,7 +198,7 @@ class GlmDataRegistrationsRegEvent extends GlmDataAbstract
                 'field'     => 'attendees',
                 'type'      => 'checkbox',
                 'use'       => 'a',
-                'default'   => 0
+                'default'   => 1
             ),
 
             // Attendee limit - 0 = unlimited
@@ -249,7 +249,7 @@ class GlmDataRegistrationsRegEvent extends GlmDataAbstract
                 'field'     => 'registration_account_options',
                 'type'      => 'bitmap',
                 'bitmap'    => $this->config['registration_account_option'],
-                'default'   => 14, // Guest, Saved, Members
+                'default'   => 14,
                 'use'       => 'a'
             ),
 
@@ -258,7 +258,7 @@ class GlmDataRegistrationsRegEvent extends GlmDataAbstract
                 'field'     => 'payment_methods',
                 'type'      => 'bitmap',
                 'bitmap'    => $this->config['payment_method'],
-                'default'   => 68, // No Charge
+                'default'   => 68,
                 'use'       => 'a'
             ),
 
@@ -267,7 +267,7 @@ class GlmDataRegistrationsRegEvent extends GlmDataAbstract
                 'field'     => 'restricted_payment_methods',
                 'type'      => 'bitmap',
                 'bitmap'    => $this->config['payment_method'],
-                'default'   => 26, // none selected
+                'default'   => 94,
                 'use'       => 'a'
             ),
 
index 4b99b92..d4cd54f 100644 (file)
@@ -339,6 +339,7 @@ class GlmMembersAdmin_registrations_events extends GlmDataRegistrationsRegEvent
                                     notify_email,
                                     admin_active,
                                     active,
+                                    time_specific,
                                     attendees,
                                     attendee_max,
                                     attendee_max_per_reg,
@@ -356,17 +357,18 @@ class GlmMembersAdmin_registrations_events extends GlmDataRegistrationsRegEvent
                                     '".$eventData['name']."',
                                     '".$eventData['name_slug']."',
                                     '".$eventData['admin_email']."',
+                                    true,
                                     false,
-                                    false,
+                                    true,
                                     true,
                                     0,
                                     0,
                                     60,
                                     10,
                                     24,
-                                    0,
-                                    0,
-                                    0,
+                                    14,
+                                    94,
+                                    26,
                                     ''
                                     )
                             ;";