Differential D20804 Diff 49608 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 439 Lines • ▼ Show 20 Lines | if ($this->getRenderingTarget() == self::TARGET_TEXT) { | ||||
->buildTransactionString($change_type); | ->buildTransactionString($change_type); | ||||
} | } | ||||
} | } | ||||
protected function renderPolicyName($phid, $state = 'old') { | protected function renderPolicyName($phid, $state = 'old') { | ||||
$policy = PhabricatorPolicy::newFromPolicyAndHandle( | $policy = PhabricatorPolicy::newFromPolicyAndHandle( | ||||
$phid, | $phid, | ||||
$this->getHandleIfExists($phid)); | $this->getHandleIfExists($phid)); | ||||
$ref = $policy->newRef($this->getViewer()); | |||||
if ($this->renderingTarget == self::TARGET_HTML) { | if ($this->renderingTarget == self::TARGET_HTML) { | ||||
switch ($policy->getType()) { | $output = $ref->newTransactionLink($state, $this); | ||||
case PhabricatorPolicyType::TYPE_CUSTOM: | |||||
$policy->setHref('/transactions/'.$state.'/'.$this->getPHID().'/'); | |||||
$policy->setWorkflow(true); | |||||
break; | |||||
default: | |||||
break; | |||||
} | |||||
$output = $policy->renderDescription(); | |||||
} else { | } else { | ||||
$output = hsprintf('%s', $policy->getFullName()); | $output = $ref->getPolicyDisplayName(); | ||||
} | } | ||||
return $output; | return $output; | ||||
} | } | ||||
public function getIcon() { | public function getIcon() { | ||||
switch ($this->getTransactionType()) { | switch ($this->getTransactionType()) { | ||||
case PhabricatorTransactions::TYPE_COMMENT: | case PhabricatorTransactions::TYPE_COMMENT: | ||||
$comment = $this->getComment(); | $comment = $this->getComment(); | ||||
if ($comment && $comment->getIsRemoved()) { | if ($comment && $comment->getIsRemoved()) { | ||||
▲ Show 20 Lines • Show All 1,338 Lines • Show Last 20 Lines |