diff --git a/src/applications/calendar/query/PhabricatorCalendarEventSearchEngine.php b/src/applications/calendar/query/PhabricatorCalendarEventSearchEngine.php index 258d95c77c..11bee4d5fa 100644 --- a/src/applications/calendar/query/PhabricatorCalendarEventSearchEngine.php +++ b/src/applications/calendar/query/PhabricatorCalendarEventSearchEngine.php @@ -166,6 +166,16 @@ final class PhabricatorCalendarEventSearchEngine return parent::buildSavedQueryFromBuiltin($query_key); } + protected function getRequiredHandlePHIDsForResultList( + array $objects, + PhabricatorSavedQuery $query) { + $phids = array(); + foreach ($objects as $event) { + $phids[$event->getUserPHID()] = 1; + } + return array_keys($phids); + } + protected function renderResultList( array $events, PhabricatorSavedQuery $query, @@ -192,6 +202,7 @@ final class PhabricatorCalendarEventSearchEngine } $from = phabricator_datetime($event->getDateFrom(), $viewer); $to = phabricator_datetime($event->getDateTo(), $viewer); + $creator_handle = $handles[$event->getUserPHID()]; $color = ($event->getStatus() == PhabricatorCalendarEvent::STATUS_AWAY) ? 'red' @@ -201,6 +212,7 @@ final class PhabricatorCalendarEventSearchEngine ->setHeader($event->getTerseSummary($viewer)) ->setHref($href) ->setBarColor($color) + ->addByline(pht('Creator: %s', $creator_handle->renderLink())) ->addAttribute(pht('From %s to %s', $from, $to)) ->addAttribute( phutil_utf8_shorten($event->getDescription(), 64));