Differential D20342 Diff 48553 src/applications/people/controller/PhabricatorPeopleProfileViewController.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/people/controller/PhabricatorPeopleProfileViewController.php
Show First 20 Lines • Show All 169 Lines • ▼ Show 20 Lines | final class PhabricatorPeopleProfileViewController | ||||
private function buildCalendarDayView(PhabricatorUser $user) { | private function buildCalendarDayView(PhabricatorUser $user) { | ||||
$viewer = $this->getViewer(); | $viewer = $this->getViewer(); | ||||
$class = 'PhabricatorCalendarApplication'; | $class = 'PhabricatorCalendarApplication'; | ||||
if (!PhabricatorApplication::isClassInstalledForViewer($class, $viewer)) { | if (!PhabricatorApplication::isClassInstalledForViewer($class, $viewer)) { | ||||
return null; | return null; | ||||
} | } | ||||
// Don't show calendar information for disabled users, since it's probably | |||||
// not useful or accurate and may be misleading. | |||||
if ($user->getIsDisabled()) { | |||||
return null; | |||||
} | |||||
$midnight = PhabricatorTime::getTodayMidnightDateTime($viewer); | $midnight = PhabricatorTime::getTodayMidnightDateTime($viewer); | ||||
$week_end = clone $midnight; | $week_end = clone $midnight; | ||||
$week_end = $week_end->modify('+3 days'); | $week_end = $week_end->modify('+3 days'); | ||||
$range_start = $midnight->format('U'); | $range_start = $midnight->format('U'); | ||||
$range_end = $week_end->format('U'); | $range_end = $week_end->format('U'); | ||||
$events = id(new PhabricatorCalendarEventQuery()) | $events = id(new PhabricatorCalendarEventQuery()) | ||||
▲ Show 20 Lines • Show All 83 Lines • Show Last 20 Lines |