mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-22 14:52:41 +01:00
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:
parent
942b17a980
commit
a8f937d313
1 changed files with 21 additions and 20 deletions
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue