Changeset View
Changeset View
Standalone View
Standalone View
src/applications/calendar/query/PhabricatorCalendarEventQuery.php
Show First 20 Lines • Show All 216 Lines • ▼ Show 20 Lines | foreach ($parents as $key => $event) { | ||||
$generate_from - $duration); | $generate_from - $duration); | ||||
$end_date = $this->getRecurrenceWindowEnd( | $end_date = $this->getRecurrenceWindowEnd( | ||||
$event, | $event, | ||||
$generate_until); | $generate_until); | ||||
$limit = $this->getRecurrenceLimit($event, $raw_limit); | $limit = $this->getRecurrenceLimit($event, $raw_limit); | ||||
// note that this can be NULL for some imported events | |||||
$set = $event->newRecurrenceSet(); | $set = $event->newRecurrenceSet(); | ||||
$recurrences = array(); | |||||
if ($set) { | |||||
$recurrences = $set->getEventsBetween( | $recurrences = $set->getEventsBetween( | ||||
$start_date, | $start_date, | ||||
$end_date, | $end_date, | ||||
$limit + 1); | $limit + 1); | ||||
} | |||||
valerio.bozzolan: Basically I've just indented the `$recurrences = $set->getEventsBetween()` under an `if($set)`. | |||||
Not Done Inline ActionsThe rest of the codebase uses array() instead of [], but that might just be for compatibility with old PHP. 0: The rest of the codebase uses `array()` instead of `[]`, but that might just be for… | |||||
// We're generating events from the beginning and then filtering them | // We're generating events from the beginning and then filtering them | ||||
// here (instead of only generating events starting at the start date) | // here (instead of only generating events starting at the start date) | ||||
// because we need to know the proper sequence indexes to generate ghost | // because we need to know the proper sequence indexes to generate ghost | ||||
// events. This may change after RDATE support. | // events. This may change after RDATE support. | ||||
if ($start_date) { | if ($start_date) { | ||||
$start_epoch = $start_date->getEpoch(); | $start_epoch = $start_date->getEpoch(); | ||||
} else { | } else { | ||||
▲ Show 20 Lines • Show All 509 Lines • Show Last 20 Lines |
Content licensed under Creative Commons Attribution-ShareAlike 4.0 (CC-BY-SA) unless otherwise noted; code licensed under Apache 2.0 or other open source licenses. · CC BY-SA 4.0 · Apache 2.0
Basically I've just indented the $recurrences = $set->getEventsBetween() under an if($set).