From: Michael Date: Sat, 19 Sep 2020 19:02:40 +0000 (+0000) Subject: Only display redundant preview data with preview picture X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=1a0db28d2ea3158c6efdc66cffd35bf1d7d17c42;p=friendica.git Only display redundant preview data with preview picture --- diff --git a/src/Content/PageInfo.php b/src/Content/PageInfo.php index e4d9207c8c..d301c4d04d 100644 --- a/src/Content/PageInfo.php +++ b/src/Content/PageInfo.php @@ -134,14 +134,6 @@ class PageInfo $text = "[attachment type='" . $data['type'] . "'"; - if (empty($data['text'])) { - $data['text'] = $data['title']; - } - - if (empty($data['text'])) { - $data['text'] = $data['url']; - } - if (!empty($data['url'])) { $text .= " url='" . $data['url'] . "'"; } @@ -160,6 +152,14 @@ class PageInfo $text .= " image='" . $preview . "'"; } else { $text .= " preview='" . $preview . "'"; + + if (empty($data['text'])) { + $data['text'] = $data['title']; + } + + if (empty($data['text'])) { + $data['text'] = $data['url']; + } } }