Page MenuHomePhabricator

D12631.id.diff
No OneTemporary

D12631.id.diff

diff --git a/src/applications/calendar/query/PhabricatorCalendarEventSearchEngine.php b/src/applications/calendar/query/PhabricatorCalendarEventSearchEngine.php
--- a/src/applications/calendar/query/PhabricatorCalendarEventSearchEngine.php
+++ b/src/applications/calendar/query/PhabricatorCalendarEventSearchEngine.php
@@ -191,35 +191,23 @@
PhabricatorSavedQuery $query,
array $handles) {
assert_instances_of($events, 'PhabricatorCalendarEvent');
-
$viewer = $this->requireViewer();
-
$list = new PHUIObjectItemListView();
foreach ($events as $event) {
- if ($event->getUserPHID() == $viewer->getPHID()) {
- $href = '/E'.$event->getID();
- } else {
- $from = $event->getDateFrom();
- $month = phabricator_format_local_time($from, $viewer, 'm');
- $year = phabricator_format_local_time($from, $viewer, 'Y');
- $uri = new PhutilURI($this->getApplicationURI());
- $uri->setQueryParams(
- array(
- 'month' => $month,
- 'year' => $year,
- ));
- $href = (string) $uri;
- }
+ $href = '/E'.$event->getID();
$from = phabricator_datetime($event->getDateFrom(), $viewer);
$to = phabricator_datetime($event->getDateTo(), $viewer);
$creator_handle = $handles[$event->getUserPHID()];
+ $name = (strlen($event->getName())) ?
+ $event->getName() : $event->getTerseSummary($viewer);
+
$color = ($event->getStatus() == PhabricatorCalendarEvent::STATUS_AWAY)
? 'red'
: 'yellow';
$item = id(new PHUIObjectItemView())
- ->setHeader($event->getTerseSummary($viewer))
+ ->setHeader($name)
->setHref($href)
->setBarColor($color)
->addByline(pht('Creator: %s', $creator_handle->renderLink()))

File Metadata

Mime Type
text/plain
Expires
Thu, Nov 7, 6:41 PM (1 w, 4 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6714254
Default Alt Text
D12631.id.diff (1 KB)

Event Timeline