Differential D19968 Diff 47707 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 3,259 Lines • ▼ Show 20 Lines | foreach ($xactions as $xaction) { | ||||
'comment' => $comment, | 'comment' => $comment, | ||||
'initial' => !$seen_comment, | 'initial' => !$seen_comment, | ||||
); | ); | ||||
} else { | } else { | ||||
$is_comment = false; | $is_comment = false; | ||||
} | } | ||||
if (!$is_comment || !$seen_comment) { | if (!$is_comment || !$seen_comment) { | ||||
$header = $xaction->getTitleForMail(); | $header = $xaction->getTitleForTextMail(); | ||||
if ($header !== null) { | if ($header !== null) { | ||||
$headers[] = $header; | $headers[] = $header; | ||||
} | } | ||||
$header_html = $xaction->getTitleForHTMLMail(); | $header_html = $xaction->getTitleForHTMLMail(); | ||||
if ($header_html !== null) { | if ($header_html !== null) { | ||||
$headers_html[] = $header_html; | $headers_html[] = $header_html; | ||||
} | } | ||||
▲ Show 20 Lines • Show All 68 Lines • ▼ Show 20 Lines | protected function addHeadersAndCommentsToMailBody( | ||||
foreach ($comments as $spec) { | foreach ($comments as $spec) { | ||||
$xaction = $spec['xaction']; | $xaction = $spec['xaction']; | ||||
$comment = $spec['comment']; | $comment = $spec['comment']; | ||||
$is_initial = $spec['initial']; | $is_initial = $spec['initial']; | ||||
// If this is not the first comment in the mail, add the header showing | // If this is not the first comment in the mail, add the header showing | ||||
// who wrote the comment immediately above the comment. | // who wrote the comment immediately above the comment. | ||||
if (!$is_initial) { | if (!$is_initial) { | ||||
$header = $xaction->getTitleForMail(); | $header = $xaction->getTitleForTextMail(); | ||||
if ($header !== null) { | if ($header !== null) { | ||||
$body->addRawPlaintextSection($header); | $body->addRawPlaintextSection($header); | ||||
} | } | ||||
$header_html = $xaction->getTitleForHTMLMail(); | $header_html = $xaction->getTitleForHTMLMail(); | ||||
if ($header_html !== null) { | if ($header_html !== null) { | ||||
$body->addRawHTMLSection($header_html); | $body->addRawHTMLSection($header_html); | ||||
} | } | ||||
▲ Show 20 Lines • Show All 1,541 Lines • Show Last 20 Lines |