From 4bd9b7a956328b10b8a13c8b6eeb321f6f6c1caf Mon Sep 17 00:00:00 2001 From: Rohan Katkar Date: Mon, 17 Nov 2014 11:01:21 +0530 Subject: [PATCH] Fix for CRM-15564 --- CRM/Event/Form/Registration.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CRM/Event/Form/Registration.php b/CRM/Event/Form/Registration.php index fdac42ca8a..19237c3cfb 100644 --- a/CRM/Event/Form/Registration.php +++ b/CRM/Event/Form/Registration.php @@ -1407,12 +1407,16 @@ WHERE v.option_group_id = g.id $endDate = CRM_Utils_Date::processDate(CRM_Utils_Array::value('registration_end_date', $this->_values['event'] )); + $eventEndDate = CRM_Utils_Date::processDate(CRM_Utils_Array::value('event_end_date', $this->_values['event'])); if ( $endDate && $endDate < $now ) { CRM_Core_Error::statusBounce(ts('Registration for this event ended on %1', array(1 => CRM_Utils_Date::customFormat(CRM_Utils_Array::value('registration_end_date', $this->_values['event'])))), $redirect); } + if (!empty($eventEndDate) && $eventEndDate < $now) { + CRM_Core_Error::statusBounce(ts('Event ended on %1', array(1 => CRM_Utils_Date::customFormat(CRM_Utils_Array::value('event_end_date', $this->_values['event'])))), $redirect); + } } } -- 2.25.1