From: Chuck Scott Date: Fri, 26 Jan 2018 22:05:06 +0000 (-0500) Subject: Fixed various undefined references and other misc warnings. X-Git-Tag: v1.0.0^2~44 X-Git-Url: http://cvs2.gaslightmedia.com/gitweb/?a=commitdiff_plain;h=e24269bb8138747614911ddbe59a0f5d8ae462dd;p=WP-Plugins%2Fglm-member-db-registrations.git Fixed various undefined references and other misc warnings. --- diff --git a/models/admin/ajax/updateAvailability.php b/models/admin/ajax/updateAvailability.php index 037aae4..2f1c672 100644 --- a/models/admin/ajax/updateAvailability.php +++ b/models/admin/ajax/updateAvailability.php @@ -210,9 +210,6 @@ // re-calculate the total $avail = $max - $regTime['attendee_count'] - $regTime['attendees_pending']; -trigger_error('start = '.$startTime,E_USER_NOTICE); -trigger_error('end = '.$endTime,E_USER_NOTICE); -trigger_error(print_r($_REQUEST,1),E_USER_NOTICE); // Try to update the reg_time entry $this->wpdb->update( diff --git a/models/admin/registrations/events_notifications.php b/models/admin/registrations/events_notifications.php index 847c001..a9bfa6c 100644 --- a/models/admin/registrations/events_notifications.php +++ b/models/admin/registrations/events_notifications.php @@ -19,18 +19,25 @@ $Notifications = new GlmDataRegistrationsRegNotification($this->wpdb, $this->con $regEvent = $this->getEntry($regEventID); // echo '
$regEvent: ' . print_r( $regEvent, true ) . '
'; +// Delete if ( isset( $_REQUEST['delete'] ) && filter_var( $_REQUEST['delete'], FILTER_VALIDATE_BOOLEAN ) ) { $regNotifications = $Notifications->getList("T.reg_event = $regEventID", 'notification_days'); $view = 'eventNotifications'; + +// Edit } else if ( isset( $_REQUEST['id'] ) && $notice_id = filter_var( $_REQUEST['id'], FILTER_VALIDATE_INT ) ) { $regNotifications = $Notifications->editEntry( $notice_id ); $view = 'eventEditNotification'; - $days = $regNotifications['notification_days']; + $days = $regNotifications['fieldData']['notification_days']; $when = ( $days > 0 ) ? 'after' : 'before'; + +// New } else if ( isset( $_REQUEST['new'] ) && filter_var( $_REQUEST['new'], FILTER_VALIDATE_BOOLEAN ) ) { $regNotifications = $Notifications->newEntry(); $view = 'eventEditNotification'; $newEntry = true; + +// List } else { $regNotifications = $Notifications->getList("T.reg_event = $regEventID", 'notification_days'); $view = 'eventNotifications'; diff --git a/views/admin/registrations/eventEditNotification.html b/views/admin/registrations/eventEditNotification.html index 5d254ef..632e67e 100644 --- a/views/admin/registrations/eventEditNotification.html +++ b/views/admin/registrations/eventEditNotification.html @@ -21,7 +21,7 @@
 
-