mirror of
https://github.com/friendica/friendica
synced 2024-05-25 01:44:59 +02:00
Add a link to the post if "no preview" is selected
This commit is contained in:
parent
b5a69da872
commit
b72e32a842
|
@ -3861,6 +3861,11 @@ class Item
|
||||||
$preview_mode = DI::pConfig()->get(DI::userSession()->getLocalUserId(), 'system', 'preview_mode', BBCode::PREVIEW_LARGE);
|
$preview_mode = DI::pConfig()->get(DI::userSession()->getLocalUserId(), 'system', 'preview_mode', BBCode::PREVIEW_LARGE);
|
||||||
if ($preview_mode != BBCode::PREVIEW_NONE) {
|
if ($preview_mode != BBCode::PREVIEW_NONE) {
|
||||||
$rendered = BBCode::convertAttachment('', BBCode::INTERNAL, false, $data, $uriid, $preview_mode);
|
$rendered = BBCode::convertAttachment('', BBCode::INTERNAL, false, $data, $uriid, $preview_mode);
|
||||||
|
} elseif (!self::containsLink($content, $data['url'], Post\Media::HTML)) {
|
||||||
|
$rendered = Renderer::replaceMacros(Renderer::getMarkupTemplate('content/link.tpl'), [
|
||||||
|
'$url' => $data['url'],
|
||||||
|
'$title' => $data['title'],
|
||||||
|
]);
|
||||||
} else {
|
} else {
|
||||||
$rendered = '';
|
$rendered = '';
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue