Only add the Mail "STAMPS" body section if there are stamps
Summary: Ref T13053. Some mail (like push notification mail) doesn't currently generate any stamps. Drop this section if there aren't any stamps on the mail. Test Plan: Will check push mail in production. Maniphest Tasks: T13053 Differential Revision: https://secure.phabricator.com/D19028
This commit is contained in:
@@ -66,27 +66,28 @@ final class PhabricatorMailTarget extends Phobject {
|
|||||||
|
|
||||||
if ($show_stamps) {
|
if ($show_stamps) {
|
||||||
$stamps = $mail->getMailStamps();
|
$stamps = $mail->getMailStamps();
|
||||||
|
if ($stamps) {
|
||||||
|
$body .= "\n";
|
||||||
|
$body .= pht('STAMPS');
|
||||||
|
$body .= "\n";
|
||||||
|
$body .= implode(' ', $stamps);
|
||||||
|
$body .= "\n";
|
||||||
|
|
||||||
$body .= "\n";
|
if ($has_html) {
|
||||||
$body .= pht('STAMPS');
|
$html = array();
|
||||||
$body .= "\n";
|
$html[] = phutil_tag('strong', array(), pht('STAMPS'));
|
||||||
$body .= implode(' ', $stamps);
|
$html[] = phutil_tag('br');
|
||||||
$body .= "\n";
|
$html[] = phutil_tag(
|
||||||
|
'span',
|
||||||
if ($has_html) {
|
array(
|
||||||
$html = array();
|
'style' => 'font-size: smaller; color: #92969D',
|
||||||
$html[] = phutil_tag('strong', array(), pht('STAMPS'));
|
),
|
||||||
$html[] = phutil_tag('br');
|
phutil_implode_html(' ', $stamps));
|
||||||
$html[] = phutil_tag(
|
$html[] = phutil_tag('br');
|
||||||
'span',
|
$html[] = phutil_tag('br');
|
||||||
array(
|
$html = phutil_tag('div', array(), $html);
|
||||||
'style' => 'font-size: smaller; color: #92969D',
|
$html_body .= hsprintf('%s', $html);
|
||||||
),
|
}
|
||||||
phutil_implode_html(' ', $stamps));
|
|
||||||
$html[] = phutil_tag('br');
|
|
||||||
$html[] = phutil_tag('br');
|
|
||||||
$html = phutil_tag('div', array(), $html);
|
|
||||||
$html_body .= hsprintf('%s', $html);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user