Differential D20739 Diff 49452 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,514 Lines • ▼ Show 20 Lines | public function publishTransactions( | ||||
if ($this->sendHistory) { | if ($this->sendHistory) { | ||||
$history_mail = $this->buildHistoryMail($object); | $history_mail = $this->buildHistoryMail($object); | ||||
if ($history_mail) { | if ($history_mail) { | ||||
$messages[] = $history_mail; | $messages[] = $history_mail; | ||||
} | } | ||||
} | } | ||||
foreach ($this->newAuxiliaryMail($object, $xactions) as $message) { | |||||
$messages[] = $message; | |||||
} | |||||
// NOTE: This actually sends the mail. We do this last to reduce the chance | // NOTE: This actually sends the mail. We do this last to reduce the chance | ||||
// that we send some mail, hit an exception, then send the mail again when | // that we send some mail, hit an exception, then send the mail again when | ||||
// retrying. | // retrying. | ||||
foreach ($messages as $mail) { | foreach ($messages as $mail) { | ||||
$mail->save(); | $mail->save(); | ||||
} | } | ||||
$this->queueWebhooks($object, $xactions); | $this->queueWebhooks($object, $xactions); | ||||
▲ Show 20 Lines • Show All 3,263 Lines • ▼ Show 20 Lines | foreach ($all_extensions as $key => $template) { | ||||
if ($extension->supportsObject($object)) { | if ($extension->supportsObject($object)) { | ||||
$extensions[$key] = $extension; | $extensions[$key] = $extension; | ||||
} | } | ||||
} | } | ||||
return $extensions; | return $extensions; | ||||
} | } | ||||
protected function newAuxiliaryMail($object, array $xactions) { | |||||
return array(); | |||||
} | |||||
private function generateMailStamps($object, $data) { | private function generateMailStamps($object, $data) { | ||||
if (!$data || !is_array($data)) { | if (!$data || !is_array($data)) { | ||||
return null; | return null; | ||||
} | } | ||||
$templates = $this->newMailStampTemplates($object); | $templates = $this->newMailStampTemplates($object); | ||||
foreach ($data as $spec) { | foreach ($data as $spec) { | ||||
if (!is_array($spec)) { | if (!is_array($spec)) { | ||||
▲ Show 20 Lines • Show All 577 Lines • Show Last 20 Lines |