Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F15302894
D8329.id19808.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
D8329.id19808.diff
View Options
diff --git a/src/view/phui/calendar/PHUICalendarListView.php b/src/view/phui/calendar/PHUICalendarListView.php
--- a/src/view/phui/calendar/PHUICalendarListView.php
+++ b/src/view/phui/calendar/PHUICalendarListView.php
@@ -5,18 +5,11 @@
private $events = array();
private $blankState;
- protected $user;
-
public function addEvent(AphrontCalendarEventView $event) {
$this->events[] = $event;
return $this;
}
- public function setUser($user) {
- $this->user = $user;
- return $this;
- }
-
public function showBlankState($state) {
$this->blankState = $state;
return $this;
@@ -51,7 +44,9 @@
if ($length >= $timespan) {
$timelabel = pht('All Day');
} else {
- $timelabel = phabricator_time($event->getEpochStart(), $this->user);
+ $timelabel = phabricator_time(
+ $event->getEpochStart(),
+ $this->getUser());
}
$dot = phutil_tag(
@@ -109,10 +104,10 @@
$length = ($event->getEpochEnd() - $event->getEpochStart());
if ($length >= $timespan) {
$tip = pht('%s, Until: %s', $event->getName(),
- phabricator_date($event->getEpochEnd(), $this->user));
+ phabricator_date($event->getEpochEnd(), $this->getUser()));
} else {
$tip = pht('%s, Until: %s', $event->getName(),
- phabricator_time($event->getEpochEnd(), $this->user));
+ phabricator_time($event->getEpochEnd(), $this->getUser()));
}
$description = $event->getDescription();
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mar 6 2025, 11:29 PM (6 w, 5 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7309462
Default Alt Text
D8329.id19808.diff (1 KB)
Attached To
Mode
D8329: Reuse common getUser() / setUser() in PHUICalendarListView
Attached
Detach File
Event Timeline
Log In to Comment