Differential D16818 Diff 40498 src/applications/transactions/editor/PhabricatorApplicationTransactionEditor.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/transactions/editor/PhabricatorApplicationTransactionEditor.php
Show First 20 Lines • Show All 1,135 Lines • ▼ Show 20 Lines | protected function didCatchDuplicateKeyException( | ||||
Exception $ex) { | Exception $ex) { | ||||
return; | return; | ||||
} | } | ||||
public function publishTransactions( | public function publishTransactions( | ||||
PhabricatorLiskDAO $object, | PhabricatorLiskDAO $object, | ||||
array $xactions) { | array $xactions) { | ||||
$this->object = $object; | |||||
$this->xactions = $xactions; | |||||
// Hook for edges or other properties that may need (re-)loading | // Hook for edges or other properties that may need (re-)loading | ||||
$object = $this->willPublish($object, $xactions); | $object = $this->willPublish($object, $xactions); | ||||
// The object might have changed, so reassign it. | |||||
$this->object = $object; | |||||
$messages = array(); | $messages = array(); | ||||
if (!$this->getDisableEmail()) { | if (!$this->getDisableEmail()) { | ||||
if ($this->shouldSendMail($object, $xactions)) { | if ($this->shouldSendMail($object, $xactions)) { | ||||
$messages = $this->buildMail($object, $xactions); | $messages = $this->buildMail($object, $xactions); | ||||
} | } | ||||
} | } | ||||
if ($this->supportsSearch()) { | if ($this->supportsSearch()) { | ||||
▲ Show 20 Lines • Show All 1,711 Lines • ▼ Show 20 Lines | protected function addHeadersAndCommentsToMailBody( | ||||
foreach ($comments as $comment) { | foreach ($comments as $comment) { | ||||
$body->addRemarkupSection(null, $comment); | $body->addRemarkupSection(null, $comment); | ||||
} | } | ||||
foreach ($details as $xaction) { | foreach ($details as $xaction) { | ||||
$details = $xaction->renderChangeDetailsForMail($body->getViewer()); | $details = $xaction->renderChangeDetailsForMail($body->getViewer()); | ||||
if ($details !== null) { | if ($details !== null) { | ||||
$body->addHTMLSection(pht('EDIT DETAILS'), $details); | $label = $this->getMailDiffSectionHeader($xaction); | ||||
$body->addHTMLSection($label, $details); | |||||
} | |||||
} | } | ||||
} | |||||
private function getMailDiffSectionHeader($xaction) { | |||||
$type = $xaction->getTransactionType(); | |||||
$xtype = $this->getModularTransactionType($type); | |||||
if ($xtype) { | |||||
return $xtype->getMailDiffSectionHeader(); | |||||
} | } | ||||
return pht('EDIT DETAILS'); | |||||
} | } | ||||
/** | /** | ||||
* @task mail | * @task mail | ||||
*/ | */ | ||||
protected function addCustomFieldsToMailBody( | protected function addCustomFieldsToMailBody( | ||||
PhabricatorMetaMTAMailBody $body, | PhabricatorMetaMTAMailBody $body, | ||||
PhabricatorLiskDAO $object, | PhabricatorLiskDAO $object, | ||||
▲ Show 20 Lines • Show All 914 Lines • Show Last 20 Lines |