From a5baba84afe1f5865ea946ef20ecdd7cd1adf63f Mon Sep 17 00:00:00 2001 From: Michael Date: Mon, 17 Jul 2017 19:49:58 +0000 Subject: [PATCH] Only show the attachment elements if there are one. --- include/text.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/include/text.php b/include/text.php index 83588731fc..71a2564405 100644 --- a/include/text.php +++ b/include/text.php @@ -1374,7 +1374,6 @@ function prepare_body(&$item, $attach = false, $preview = false) { $vhead = false; $arr = explode('[/attach],', $item['attach']); if (count($arr)) { - $as .= '
'; foreach ($arr as $r) { $matches = false; $icon = ''; @@ -1434,9 +1433,10 @@ function prepare_body(&$item, $attach = false, $preview = false) { } } } - $as .= '
'; } - $s = $s . $as; + if ($as != '') { + $s .= '
'.$as.'
'; + } // map if (strpos($s, '
') !== false && x($item, 'coord')) {