From b059499f284f5c283441ad8db2b6676437d63bdc Mon Sep 17 00:00:00 2001 From: Steve Sutton Date: Mon, 15 May 2017 16:13:24 -0400 Subject: [PATCH] Need recurrence date for events when searching names. Needed for proper output. --- models/front/events/list.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/models/front/events/list.php b/models/front/events/list.php index b94133d..2d3f68c 100644 --- a/models/front/events/list.php +++ b/models/front/events/list.php @@ -302,7 +302,9 @@ class GlmMembersFront_events_list extends GlmMembersFront_events_baseAction $events = $this->getModelEventsData( $categoryId, $limit, $memberId, $amenityId, $venueId ); break; case 'event-list-name': + $this->postAddRecurrences = true; $events = $this->getModelEventsData( $eventNameSearch, null, $memberId, $amenityId, $venueId ); + $this->postAddRecurrences = false; if ( !$view ) { $view = 'agenda.html'; } @@ -759,12 +761,12 @@ class GlmMembersFront_events_list extends GlmMembersFront_events_baseAction } else { $calendar_view = $calendar_view[0]['calendar_view']; } - + $years = array('current' => $current_year = date("Y"), 'next' => date('Y') +1 ); $months = []; $count = 0; foreach($years as $key=>$year){ - + if($current_year == $year){ $sql = 'SELECT MONTH(start_time) as month FROM '. GLM_MEMBERS_EVENTS_PLUGIN_DB_PREFIX .'times '; $sql .= "WHERE YEAR(start_time) = $year AND MONTH(start_time) >= MONTH(CURDATE()) GROUP BY month"; @@ -789,7 +791,7 @@ class GlmMembersFront_events_list extends GlmMembersFront_events_baseAction } $json_months = json_encode($months); ksort($months); - + // Compile template data $templateData = array( 'eventDays' => $eventDays, -- 2.17.1