mirror of
https://github.com/friendica/friendica
synced 2025-04-27 09:10:12 +00:00
OStatus: Better attachment handling for pictures
This commit is contained in:
parent
ce975ceba2
commit
6e670df80f
2 changed files with 27 additions and 29 deletions
|
@ -1424,15 +1424,8 @@ function prepare_body(&$item, $attach = false, $preview = false) {
|
|||
$title = ((strlen(trim($mtch[4]))) ? escape_tags(trim($mtch[4])) : escape_tags($mtch[1]));
|
||||
$title .= ' ' . $mtch[2] . ' ' . t('bytes');
|
||||
|
||||
if (($filetype == 'image') AND ($item['network'] == NETWORK_OSTATUS)) {
|
||||
/// @todo Respect the spoiler for mastodon
|
||||
$icon = '<img class="attached" src="'.$the_url.'" alt="" title="'.$title.'">';
|
||||
$s .= '<br><a href="' . strip_tags($the_url) . '" title="' . $title . '" class="attached" target="_blank" >' . $icon . '</a>';
|
||||
} else {
|
||||
$icon = '<div class="attachtype icon s22 type-' . $filetype . ' subtype-' . $filesubtype . '"></div>';
|
||||
$as .= '<a href="' . strip_tags($the_url) . '" title="' . $title . '" class="attachlink" target="_blank" >' . $icon . '</a>';
|
||||
}
|
||||
|
||||
$icon = '<div class="attachtype icon s22 type-' . $filetype . ' subtype-' . $filesubtype . '"></div>';
|
||||
$as .= '<a href="' . strip_tags($the_url) . '" title="' . $title . '" class="attachlink" target="_blank" >' . $icon . '</a>';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue