Skip to content

Commit

Permalink
Merge pull request #135 from IanSimpson/master
Browse files Browse the repository at this point in the history
Fix multiple issues
  • Loading branch information
Aaron Carlino committed May 30, 2017
2 parents b38b28b + 56c5ac5 commit 18e2462
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions code/Calendar.php
Original file line number Diff line number Diff line change
Expand Up @@ -371,6 +371,11 @@ public function getFeedEvents($start_date, $end_date) {
}
$startdatetime = $this->iCalDateToDateTime($event['DTSTART']);//->setTimezone(new DateTimeZone($this->stat('timezone')));
$enddatetime = $this->iCalDateToDateTime($event['DTEND']);//->setTimezone(new DateTimeZone($this->stat('timezone')));

//Set event start/end to midnight to allow comparisons below to work
$startdatetime->modify('00:00:00');
$enddatetime->modify('00:00:00');

if ( ($startdatetime < $start && $enddatetime < $start)
|| $startdatetime > $end && $enddatetime > $end) {
// do nothing; dates outside range
Expand Down Expand Up @@ -663,6 +668,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();

Expand Down

0 comments on commit 18e2462

Please sign in to comment.