diff --git a/include/text.php b/include/text.php
index ea5deb4c14..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 = '';
@@ -1411,39 +1410,33 @@ function prepare_body(&$item, $attach = false, $preview = false) {
));
}
- $filetype = strtolower(substr( $mime, 0, strpos($mime,'/') ));
+ $filetype = strtolower(substr($mime, 0, strpos($mime,'/')));
if ($filetype) {
- $filesubtype = strtolower(substr( $mime, strpos($mime,'/') + 1 ));
+ $filesubtype = strtolower(substr($mime, strpos($mime,'/') + 1));
$filesubtype = str_replace('.', '-', $filesubtype);
} else {
$filetype = 'unkn';
$filesubtype = 'unkn';
}
- $icon = '
';
- /*$icontype = strtolower(substr($mtch[3],0,strpos($mtch[3],'/')));
- switch($icontype) {
- case 'video':
- case 'audio':
- case 'image':
- case 'text':
- $icon = '
';
- break;
- default:
- $icon = '
';
- break;
- }*/
-
$title = ((strlen(trim($mtch[4]))) ? escape_tags(trim($mtch[4])) : escape_tags($mtch[1]));
$title .= ' ' . $mtch[2] . ' ' . t('bytes');
- $as .= '
' . $icon . '';
+ if (($filetype == 'image') AND ($item['network'] == NETWORK_OSTATUS)) {
+ $icon = '

';
+ $s .= '
' . $icon . '';
+ } else {
+ $icon = '
';
+ $as .= '
' . $icon . '';
+ }
+
}
}
}
- $as .= '
';
}
- $s = $s . $as;
+ if ($as != '') {
+ $s .= '