Differential D20888 Diff 49792 src/applications/transactions/storage/PhabricatorApplicationTransaction.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/transactions/storage/PhabricatorApplicationTransaction.php
Show First 20 Lines • Show All 436 Lines • ▼ Show 20 Lines | if ($this->getRenderingTarget() == self::TARGET_TEXT) { | ||||
return id(new SubscriptionListStringBuilder()) | return id(new SubscriptionListStringBuilder()) | ||||
->setHandles($handles) | ->setHandles($handles) | ||||
->setObjectPHID($this->getPHID()) | ->setObjectPHID($this->getPHID()) | ||||
->buildTransactionString($change_type); | ->buildTransactionString($change_type); | ||||
} | } | ||||
} | } | ||||
protected function renderPolicyName($phid, $state = 'old') { | protected function renderPolicyName($phid, $state = 'old') { | ||||
try { | |||||
$policy = PhabricatorPolicy::newFromPolicyAndHandle( | $policy = PhabricatorPolicy::newFromPolicyAndHandle( | ||||
$phid, | $phid, | ||||
$this->getHandleIfExists($phid)); | $this->getHandleIfExists($phid)); | ||||
} catch (Exception $ex) { | |||||
return pht('Invalid Policy <%s>', $phid); | |||||
} | |||||
$ref = $policy->newRef($this->getViewer()); | $ref = $policy->newRef($this->getViewer()); | ||||
if ($this->renderingTarget == self::TARGET_HTML) { | if ($this->renderingTarget == self::TARGET_HTML) { | ||||
$output = $ref->newTransactionLink($state, $this); | $output = $ref->newTransactionLink($state, $this); | ||||
} else { | } else { | ||||
$output = $ref->getPolicyDisplayName(); | $output = $ref->getPolicyDisplayName(); | ||||
} | } | ||||
▲ Show 20 Lines • Show All 1,347 Lines • Show Last 20 Lines |