@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Reuse common getUser() / setUser() in PHUICalendarListView

Summary:
These methods already exist in AphrontView. The redefinition can sometimes cause this warning:

[2014-02-24 18:27:48] ERROR 2048: Declaration of PHUICalendarListView::setUser() should be compatible with AphrontView::setUser(PhabricatorUser $user) at [/INSECURE/devtools/phabricator/src/view/phui/calendar/PHUICalendarListView.php:138]

Test Plan: Viewed calendar on profile.

Reviewers: chad, btrahan

Reviewed By: chad

CC: aran

Differential Revision: https://secure.phabricator.com/D8329

+5 -10
+5 -10
src/view/phui/calendar/PHUICalendarListView.php
··· 5 5 private $events = array(); 6 6 private $blankState; 7 7 8 - protected $user; 9 - 10 8 public function addEvent(AphrontCalendarEventView $event) { 11 9 $this->events[] = $event; 12 - return $this; 13 - } 14 - 15 - public function setUser($user) { 16 - $this->user = $user; 17 10 return $this; 18 11 } 19 12 ··· 51 44 if ($length >= $timespan) { 52 45 $timelabel = pht('All Day'); 53 46 } else { 54 - $timelabel = phabricator_time($event->getEpochStart(), $this->user); 47 + $timelabel = phabricator_time( 48 + $event->getEpochStart(), 49 + $this->getUser()); 55 50 } 56 51 57 52 $dot = phutil_tag( ··· 109 104 $length = ($event->getEpochEnd() - $event->getEpochStart()); 110 105 if ($length >= $timespan) { 111 106 $tip = pht('%s, Until: %s', $event->getName(), 112 - phabricator_date($event->getEpochEnd(), $this->user)); 107 + phabricator_date($event->getEpochEnd(), $this->getUser())); 113 108 } else { 114 109 $tip = pht('%s, Until: %s', $event->getName(), 115 - phabricator_time($event->getEpochEnd(), $this->user)); 110 + phabricator_time($event->getEpochEnd(), $this->getUser())); 116 111 } 117 112 118 113 $description = $event->getDescription();