From 5a337892668e22a376a7e65d7818cc78f23a7bd1 Mon Sep 17 00:00:00 2001 From: Ian Date: Thu, 25 May 2017 16:18:34 +1200 Subject: [PATCH] Fix issue with monthly preview not showing all events The monthly preview calendar works by doing an ajax request for all events in each month. This was limiting to 20 events by default, due to pagination. This meant that where there were more than 20 events in a month, days after the 20th weren't being marked as having an event. --- code/Calendar.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/code/Calendar.php b/code/Calendar.php index ba71493..90031f7 100755 --- a/code/Calendar.php +++ b/code/Calendar.php @@ -663,6 +663,10 @@ public function rss() { public function monthjson(SS_HTTPRequest $r) { if(!$r->param('ID')) return false; + + //Increase the per page limit to 500 as the AJAX request won't look for further pages + $this->EventsPerPage = 500; + $this->startDate = sfDate::getInstance(CalendarUtil::get_date_from_string($r->param('ID'))); $this->endDate = sfDate::getInstance($this->startDate)->finalDayOfMonth();