From: Michael Date: Mon, 17 Jul 2017 19:49:58 +0000 (+0000) Subject: Only show the attachment elements if there are one. X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=a5baba84afe1f5865ea946ef20ecdd7cd1adf63f;p=friendica.git Only show the attachment elements if there are one. --- 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')) {