From: Chuck Scott Date: Thu, 2 Nov 2017 16:01:36 +0000 (-0400) Subject: Fixed duplicate function name is data class caused by last conflict resolution. X-Git-Tag: v1.0.0^2~301 X-Git-Url: http://cvs2.gaslightmedia.com/gitweb/index.cgi?a=commitdiff_plain;h=0bfc34f691f3f502d112dbf78512c02dc92f6477;p=WP-Plugins%2Fglm-member-db-registrations.git Fixed duplicate function name is data class caused by last conflict resolution. 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. --- diff --git a/classes/data/dataRegEvent.php b/classes/data/dataRegEvent.php index d5482d2..6c6ad00 100644 --- a/classes/data/dataRegEvent.php +++ b/classes/data/dataRegEvent.php @@ -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 '
$eventData: ' . print_r( $eventData, true ) . '
'; // Add to the registration event arraytrue diff --git a/classes/regCartSupport.php b/classes/regCartSupport.php index 211849c..fc89a13 100644 --- a/classes/regCartSupport.php +++ b/classes/regCartSupport.php @@ -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 index 0000000..1dedda5 --- /dev/null +++ b/models/admin/ajax/DELETE-cartLinkWidget.php @@ -0,0 +1,79 @@ + + * @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 index 1dedda5..0000000 --- a/models/admin/ajax/cartLinkWidget.php +++ /dev/null @@ -1,79 +0,0 @@ - - * @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/setup/adminHooks.php b/setup/adminHooks.php index ba8faec..4e4ddd2 100644 --- a/setup/adminHooks.php +++ b/setup/adminHooks.php @@ -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®EventID=".$regEvent['id']); + return array( + 'title' => 'Registrations', + 'url' => GLM_MEMBERS_PLUGIN_ADMIN_MENU_URL_BASE."registrations-events&option=eventDashboard®EventID=".$regEvent['id'], + 'warning_title' => 'Registration Dashboard for this Event', + 'edit_warning' => 'This event is setup for registrations!
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.
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, diff --git a/setup/frontHooks.php b/setup/frontHooks.php index 4bebe6f..6f62b7c 100644 --- a/setup/frontHooks.php +++ b/setup/frontHooks.php @@ -59,6 +59,8 @@ add_filter( $regCartSummary['status'] = true; } + // echo "regCartSummary
".print_r($regCartSummary,1)."
"; + // 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';