Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

calendar: fix start moment #991

Merged
merged 1 commit into from
Apr 9, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 11 additions & 5 deletions js/components/calendar.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion js/loader.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 2 additions & 4 deletions vendor/dashticz/ical/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ function icaljg($ICS, $MAXITEMS, $HISTORY) {
'defaultWeekStart' => 'MO', // Default value
'disableCharacterReplacement' => false, // Default value
'filterDaysAfter' => 365, // Default value
'filterDaysBefore' => (int)$HISTORY+2,
'filterDaysBefore' => (int)$HISTORY+8, //for the calendar view we may need one additional week
'skipRecurrence' => false, // Default value
));
// $ical->initFile('ICal.ics');
Expand Down Expand Up @@ -201,7 +201,6 @@ public function eventsFromInterval($interval)
$end=$start;
$duration = $end-$start;

if ($end>time()-((int)$HISTORY*24*3600)) {
$jsEvt = array(
"id" => ($id++),
"title" => $event->summary,
Expand All @@ -214,9 +213,8 @@ public function eventsFromInterval($interval)
/* $a=array();
array_push($a,$ev["ATTENDEE"]); */
$data[] = $jsEvt;
if ($id>=$MAXITEMS)
if ($id>=500) //we limit to 500 events. Should be sufficient ...
break;
}
}
return $data;
} catch (\Exception $e) {
Expand Down