1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-10 00:42:41 +01:00

Make Calendar Event handles slightly more modern

Summary: Ref T11326. Use modern methods instead of building this stuff separately.

Test Plan: Used `E123`, `{E123}`, saw references render normally.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T11326

Differential Revision: https://secure.phabricator.com/D16300
This commit is contained in:
epriestley 2016-07-14 09:56:42 -07:00
parent 3085e52843
commit 893edf9d95

View file

@ -32,16 +32,16 @@ final class PhabricatorCalendarEventPHIDType extends PhabricatorPHIDType {
foreach ($handles as $phid => $handle) {
$event = $objects[$phid];
$id = $event->getID();
$monogram = $event->getMonogram();
$name = $event->getName();
$is_cancelled = $event->getIsCancelled();
$uri = $event->getURI();
$handle
->setName($name)
->setFullName(pht('E%d: %s', $id, $name))
->setURI('/E'.$id);
->setFullName(pht('%s: %s', $monogram, $name))
->setURI($uri);
if ($is_cancelled) {
if ($event->isCancelledEvent()) {
$handle->setStatus(PhabricatorObjectHandle::STATUS_CLOSED);
}
}