mirror of
https://github.com/friendica/friendica
synced 2025-01-03 20:02:19 +00:00
Merge pull request #14033 from annando/content-link
Add a link to the post if "no preview" is selected
This commit is contained in:
commit
1b9fa0fe00
1 changed files with 5 additions and 0 deletions
|
@ -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