]> git.mxchange.org Git - friendica.git/blobdiff - src/Content/Item.php
Change parameter to PostMedias in Item::makeImageGrid
[friendica.git] / src / Content / Item.php
index 163db89aa472c6b698cffb5ca92d244d9d7b4b4f..c94ec1299b3f5bc0bb9482cc1e8844cc2b91e705 100644 (file)
@@ -638,7 +638,7 @@ class Item
                        $body = $item['body'];
                }
 
-               if (empty($item['quote-uri-id'])) {
+               if (empty($item['quote-uri-id']) || ($item['quote-uri-id'] == $item['uri-id'])) {
                        return $body;
                }
 
@@ -729,7 +729,7 @@ class Item
         */
        public function getSharedPost(array $item, array $fields = []): array
        {
-               if (!empty($item['quote-uri-id'])) {
+               if (!empty($item['quote-uri-id']) && ($item['quote-uri-id'] != $item['uri-id'])) {
                        $shared = Post::selectFirst($fields, ['uri-id' => $item['quote-uri-id'], 'uid' => [0, $item['uid'] ?? 0]]);
                        if (is_array($shared)) {
                                return [
@@ -770,7 +770,7 @@ class Item
                        return $attributes;
                }
 
-               if (!empty($item['quote-uri-id'])) {
+               if (!empty($item['quote-uri-id']) && ($item['quote-uri-id'] != $item['uri-id'])) {
                        $shared = Post::selectFirst(['author-name', 'author-link', 'author-avatar', 'plink', 'created', 'guid', 'uri', 'body'], ['uri-id' => $item['quote-uri-id']]);
                        if (!empty($shared)) {
                                return [