From 0bfc34f691f3f502d112dbf78512c02dc92f6477 Mon Sep 17 00:00:00 2001 From: Chuck Scott Date: Thu, 2 Nov 2017 12:01:36 -0400 Subject: [PATCH] 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. --- classes/data/dataRegEvent.php | 1 + classes/regCartSupport.php | 3 +-- ...rtLinkWidget.php => DELETE-cartLinkWidget.php} | 0 setup/adminHooks.php | 15 +++++++++++++-- setup/frontHooks.php | 2 ++ 5 files changed, 17 insertions(+), 4 deletions(-) rename models/admin/ajax/{cartLinkWidget.php => DELETE-cartLinkWidget.php} (100%) 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/cartLinkWidget.php b/models/admin/ajax/DELETE-cartLinkWidget.php similarity index 100% rename from models/admin/ajax/cartLinkWidget.php rename to models/admin/ajax/DELETE-cartLinkWidget.php 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'; -- 2.17.1