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) {
|
||||
$stamps = $mail->getMailStamps();
|
||||
if ($stamps) {
|
||||
$body .= "\n";
|
||||
$body .= pht('STAMPS');
|
||||
$body .= "\n";
|
||||
$body .= implode(' ', $stamps);
|
||||
$body .= "\n";
|
||||
|
||||
$body .= "\n";
|
||||
$body .= pht('STAMPS');
|
||||
$body .= "\n";
|
||||
$body .= implode(' ', $stamps);
|
||||
$body .= "\n";
|
||||
|
||||
if ($has_html) {
|
||||
$html = array();
|
||||
$html[] = phutil_tag('strong', array(), pht('STAMPS'));
|
||||
$html[] = phutil_tag('br');
|
||||
$html[] = phutil_tag(
|
||||
'span',
|
||||
array(
|
||||
'style' => 'font-size: smaller; color: #92969D',
|
||||
),
|
||||
phutil_implode_html(' ', $stamps));
|
||||
$html[] = phutil_tag('br');
|
||||
$html[] = phutil_tag('br');
|
||||
$html = phutil_tag('div', array(), $html);
|
||||
$html_body .= hsprintf('%s', $html);
|
||||
if ($has_html) {
|
||||
$html = array();
|
||||
$html[] = phutil_tag('strong', array(), pht('STAMPS'));
|
||||
$html[] = phutil_tag('br');
|
||||
$html[] = phutil_tag(
|
||||
'span',
|
||||
array(
|
||||
'style' => 'font-size: smaller; color: #92969D',
|
||||
),
|
||||
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