Differential D15327 Diff 36968 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 450 Lines • ▼ Show 20 Lines | /* -( Rendering )---------------------------------------------------------- */ | ||||
protected function getTransactionCustomField() { | protected function getTransactionCustomField() { | ||||
switch ($this->getTransactionType()) { | switch ($this->getTransactionType()) { | ||||
case PhabricatorTransactions::TYPE_CUSTOMFIELD: | case PhabricatorTransactions::TYPE_CUSTOMFIELD: | ||||
$key = $this->getMetadataValue('customfield:key'); | $key = $this->getMetadataValue('customfield:key'); | ||||
if (!$key) { | if (!$key) { | ||||
return null; | return null; | ||||
} | } | ||||
$object = $this->getObject(); | |||||
if (!($object instanceof PhabricatorCustomFieldInterface)) { | |||||
return null; | |||||
} | |||||
$field = PhabricatorCustomField::getObjectField( | $field = PhabricatorCustomField::getObjectField( | ||||
$this->getObject(), | $object, | ||||
PhabricatorCustomField::ROLE_APPLICATIONTRANSACTIONS, | PhabricatorCustomField::ROLE_APPLICATIONTRANSACTIONS, | ||||
$key); | $key); | ||||
if (!$field) { | if (!$field) { | ||||
return null; | return null; | ||||
} | } | ||||
$field->setViewer($this->getViewer()); | $field->setViewer($this->getViewer()); | ||||
return $field; | return $field; | ||||
▲ Show 20 Lines • Show All 950 Lines • Show Last 20 Lines |