Differential D25002 Diff 39 src/applications/metamta/controller/PhabricatorMetaMTAMailViewController.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/metamta/controller/PhabricatorMetaMTAMailViewController.php
Show First 20 Lines • Show All 113 Lines • ▼ Show 20 Lines | private function buildMessageProperties(PhabricatorMetaMTAMail $mail) { | ||||
$properties = id(new PHUIPropertyListView()) | $properties = id(new PHUIPropertyListView()) | ||||
->setUser($viewer) | ->setUser($viewer) | ||||
->setObject($mail); | ->setObject($mail); | ||||
if ($mail->getFrom()) { | if ($mail->getFrom()) { | ||||
$from_str = $viewer->renderHandle($mail->getFrom()); | $from_str = $viewer->renderHandle($mail->getFrom()); | ||||
} else { | } else { | ||||
$from_str = pht('Sent by Phabricator'); | $from_str = pht('Sent by %s', PhabricatorPlatformSite::getName()); | ||||
} | } | ||||
$properties->addProperty( | $properties->addProperty( | ||||
pht('From'), | pht('From'), | ||||
$from_str); | $from_str); | ||||
if ($mail->getToPHIDs()) { | if ($mail->getToPHIDs()) { | ||||
$to_list = $viewer->renderHandleList($mail->getToPHIDs()); | $to_list = $viewer->renderHandleList($mail->getToPHIDs()); | ||||
} else { | } else { | ||||
▲ Show 20 Lines • Show All 292 Lines • ▼ Show 20 Lines | if (!strlen($details)) { | ||||
$details = phutil_tag('em', array(), pht('None')); | $details = phutil_tag('em', array(), pht('None')); | ||||
} | } | ||||
$properties->addProperty(pht('Status Details'), $details); | $properties->addProperty(pht('Status Details'), $details); | ||||
$actor_phid = $mail->getActorPHID(); | $actor_phid = $mail->getActorPHID(); | ||||
if ($actor_phid) { | if ($actor_phid) { | ||||
$actor_str = $viewer->renderHandle($actor_phid); | $actor_str = $viewer->renderHandle($actor_phid); | ||||
} else { | } else { | ||||
$actor_str = pht('Generated by Phabricator'); | $actor_str = pht('Generated by %s', PhabricatorPlatformSite::getName()); | ||||
} | } | ||||
$properties->addProperty(pht('Actor'), $actor_str); | $properties->addProperty(pht('Actor'), $actor_str); | ||||
$related_phid = $mail->getRelatedPHID(); | $related_phid = $mail->getRelatedPHID(); | ||||
if ($related_phid) { | if ($related_phid) { | ||||
$related = $viewer->renderHandle($mail->getRelatedPHID()); | $related = $viewer->renderHandle($mail->getRelatedPHID()); | ||||
} else { | } else { | ||||
$related = phutil_tag('em', array(), pht('None')); | $related = phutil_tag('em', array(), pht('None')); | ||||
Show All 11 Lines |
Content licensed under Creative Commons Attribution-ShareAlike 4.0 (CC-BY-SA) unless otherwise noted; code licensed under Apache 2.0 or other open source licenses. · CC BY-SA 4.0 · Apache 2.0