Fixed duplicate function name is data class caused by last conflict resolution.
authorChuck Scott <cscott@gaslightmedia.com>
Thu, 2 Nov 2017 16:01:36 +0000 (12:01 -0400)
committerChuck Scott <cscott@gaslightmedia.com>
Thu, 2 Nov 2017 16:05:07 +0000 (12:05 -0400)
Marking cartLinkWidget.php for deletion if no problems occur. Don't believe this is in use.
Added data to registrations hook for Events for used on event edit page.

classes/data/dataRegEvent.php
classes/regCartSupport.php
models/admin/ajax/DELETE-cartLinkWidget.php [new file with mode: 0644]
models/admin/ajax/cartLinkWidget.php [deleted file]
setup/adminHooks.php
setup/frontHooks.php

index d5482d2..6c6ad00 100644 (file)
@@ -353,6 +353,7 @@ class GlmDataRegistrationsRegEvent extends GlmDataAbstract
 
                 // Use hook to Events to get current data for this event
                 $eventData = apply_filters('glm-member-db-events-get-event', $result_data['event']);
+
                 // echo '<pre>$eventData: ' . print_r( $eventData, true ) . '</pre>';
 
                 // Add to the registration event arraytrue
index 211849c..fc89a13 100644 (file)
@@ -781,8 +781,7 @@ class GlmRegCartSupport
     }
 
     /*
-     * Remove an e        // If there's a
-vent record from the cart
+     * Remove an event record from the cart
      *
      *
      * @param integer $id ID of this reg_request_event record
diff --git a/models/admin/ajax/DELETE-cartLinkWidget.php b/models/admin/ajax/DELETE-cartLinkWidget.php
new file mode 100644 (file)
index 0000000..1dedda5
--- /dev/null
@@ -0,0 +1,79 @@
+<?php
+
+/**
+ * Gaslight Media Members Database
+ * PDF Output by admin-ajax
+ *
+ * PHP version 5.5
+ *
+ * @category glmWordPressPlugin
+ * @package  glmMembersDatabase
+ * @author   Chuck Scott <cscott@gaslightmedia.com>
+ * @license  http://www.gaslightmedia.com Gaslightmedia
+ * @version  0.1
+ */
+
+require_once GLM_MEMBERS_REGISTRATIONS_PLUGIN_PATH .  '/models/front/registrations/cartLinkWidget.php';
+/**
+ * Steve Note...
+ *
+ * You can get to this using the following URL.
+ *
+ * {host}/wp-admin/admin-ajax.php?action=glm_members_admin_ajax&glm_action=login
+ *
+ * You should be able to do this as POST or GET and should be able to add and read additional parameters.
+ * I added a "mystuff" parameter to the URL above and it does output from the code in the
+ * modelAction() function below.
+ *
+ * To add another model under models/admin/ajax all you need to do is create it and add it to the
+ * setup/validActions.php file.
+ *
+ */
+
+/**
+ * This class performs the work of handling images passed to it via
+ * an AJAX call that goes through the WorPress AJAX Handler.
+ *
+ */
+class GlmMembersAdmin_ajax_cartLinkWidget extends GlmMembersFront_registrations_cartLinkWidget
+{
+
+    /**
+     * WordPress Database Object
+     *
+     * @var $wpdb
+     * @access public
+     */
+    public $wpdb;
+    /**
+     * Plugin Configuration Data
+     *
+     * @var $config
+     * @access public
+     */
+    public $config;
+
+    /*
+     * Constructor
+     *
+     * This contructor sets up this model. At this time that only includes
+     * storing away the WordPress data object.
+     *
+     * @return object Class object
+     *
+     */
+    public function __construct ($wpdb, $config)
+    {
+
+        // Save WordPress Database object
+        $this->wpdb = $wpdb;
+
+        // Save plugin configuration object
+        $this->config = $config;
+
+        // Run constructor for data class
+        // parent::__construct(false, false);
+
+    }
+
+}
diff --git a/models/admin/ajax/cartLinkWidget.php b/models/admin/ajax/cartLinkWidget.php
deleted file mode 100644 (file)
index 1dedda5..0000000
+++ /dev/null
@@ -1,79 +0,0 @@
-<?php
-
-/**
- * Gaslight Media Members Database
- * PDF Output by admin-ajax
- *
- * PHP version 5.5
- *
- * @category glmWordPressPlugin
- * @package  glmMembersDatabase
- * @author   Chuck Scott <cscott@gaslightmedia.com>
- * @license  http://www.gaslightmedia.com Gaslightmedia
- * @version  0.1
- */
-
-require_once GLM_MEMBERS_REGISTRATIONS_PLUGIN_PATH .  '/models/front/registrations/cartLinkWidget.php';
-/**
- * Steve Note...
- *
- * You can get to this using the following URL.
- *
- * {host}/wp-admin/admin-ajax.php?action=glm_members_admin_ajax&glm_action=login
- *
- * You should be able to do this as POST or GET and should be able to add and read additional parameters.
- * I added a "mystuff" parameter to the URL above and it does output from the code in the
- * modelAction() function below.
- *
- * To add another model under models/admin/ajax all you need to do is create it and add it to the
- * setup/validActions.php file.
- *
- */
-
-/**
- * This class performs the work of handling images passed to it via
- * an AJAX call that goes through the WorPress AJAX Handler.
- *
- */
-class GlmMembersAdmin_ajax_cartLinkWidget extends GlmMembersFront_registrations_cartLinkWidget
-{
-
-    /**
-     * WordPress Database Object
-     *
-     * @var $wpdb
-     * @access public
-     */
-    public $wpdb;
-    /**
-     * Plugin Configuration Data
-     *
-     * @var $config
-     * @access public
-     */
-    public $config;
-
-    /*
-     * Constructor
-     *
-     * This contructor sets up this model. At this time that only includes
-     * storing away the WordPress data object.
-     *
-     * @return object Class object
-     *
-     */
-    public function __construct ($wpdb, $config)
-    {
-
-        // Save WordPress Database object
-        $this->wpdb = $wpdb;
-
-        // Save plugin configuration object
-        $this->config = $config;
-
-        // Run constructor for data class
-        // parent::__construct(false, false);
-
-    }
-
-}
index ba8faec..4e4ddd2 100644 (file)
@@ -63,14 +63,25 @@ add_filter(
             if ($regEvent) {
 
                 // Return link title and URL for this event in registrations
-                return array('title' => 'Registrations', 'url' => GLM_MEMBERS_PLUGIN_ADMIN_MENU_URL_BASE."registrations-events&option=eventDashboard&regEventID=".$regEvent['id']);
+                return array(
+                    'title' => 'Registrations',
+                    'url' => GLM_MEMBERS_PLUGIN_ADMIN_MENU_URL_BASE."registrations-events&option=eventDashboard&regEventID=".$regEvent['id'],
+                    'warning_title' => 'Registration Dashboard for this Event',
+                    'edit_warning' => 'This event is setup for registrations!<br>If you modify dates or schedules for this event, you must check registrations afterwards.',
+                    'update_warning' => 'You updated an event that is setup for registrations.<br>If you modified any dates or schedules you must check registrations.'
+                );
 
             }
 
         }
 
         // Since we must not have had a good event ID or didn't find the event in registrations, return title and url to add this event to registrations
-        return array('title' => 'Add Registrations To Event', 'url' => GLM_MEMBERS_PLUGIN_ADMIN_MENU_URL_BASE."registrations-events&option=eventDashboard&option=add&event=".$eventId);
+        return array(
+            'title' => 'Add Registrations To Event',
+            'url' => GLM_MEMBERS_PLUGIN_ADMIN_MENU_URL_BASE."registrations-events&option=eventDashboard&option=add&event=".$eventId,
+            'edit_warning' => '',
+            'update_warning' => ''
+        );
 
     },
     10,
index 4bebe6f..6f62b7c 100644 (file)
@@ -59,6 +59,8 @@ add_filter(
             $regCartSummary['status'] = true;
         }
 
+        // echo "regCartSummary<pre>".print_r($regCartSummary,1)."</pre>";
+
         // Add in the current link url for the cart page
         $regCartSummary['cartUrl'] = GLM_MEMBERS_REGISTRATIONS_SITE_BASE_URL.$this->config['settings']['canonical_reg_page'].'/?page=cart';