]> git.mxchange.org Git - friendica.git/blobdiff - src/Model/Tag.php
Merge pull request #9815 from annando/post-again
[friendica.git] / src / Model / Tag.php
index 8ffb5b64f88957461c17ec32962b2352494e52c9..63a4ff492c662b32bf281db5614ba79235ef78c6 100644 (file)
@@ -340,7 +340,7 @@ class Tag
        public static function createImplicitMentions(int $uri_id, int $parent_uri_id)
        {
                // Always mention the direct parent author
-               $parent = Item::selectFirst(['author-link', 'author-name'], ['uri-id' => $parent_uri_id]);
+               $parent = Post::selectFirst(['author-link', 'author-name'], ['uri-id' => $parent_uri_id]);
                self::store($uri_id, self::IMPLICIT_MENTION, $parent['author-name'], $parent['author-link']);
 
                if (DI::config()->get('system', 'disable_implicit_mentions')) {
@@ -452,7 +452,7 @@ class Tag
        public static function countByTag(string $search, int $uid = 0)
        {
                $condition = ["`name` = ? AND (NOT `private` OR (`private` AND `uid` = ?))
-                       AND `uri-id` IN (SELECT `uri-id` FROM `item` WHERE `network` IN (?, ?, ?, ?))",
+                       AND `uri-id` IN (SELECT `uri-id` FROM `post-view` WHERE `network` IN (?, ?, ?, ?))",
                        $search, $uid, Protocol::ACTIVITYPUB, Protocol::DFRN, Protocol::DIASPORA, Protocol::OSTATUS];
                $params = ['group_by' => ['uri-id']];
 
@@ -472,7 +472,7 @@ class Tag
        public static function getURIIdListByTag(string $search, int $uid = 0, int $start = 0, int $limit = 100, int $last_uriid = 0)
        {
                $condition = ["`name` = ? AND (NOT `private` OR (`private` AND `uid` = ?))
-                       AND `uri-id` IN (SELECT `uri-id` FROM `item` WHERE `network` IN (?, ?, ?, ?))",
+                       AND `uri-id` IN (SELECT `uri-id` FROM `post-view` WHERE `network` IN (?, ?, ?, ?))",
                        $search, $uid, Protocol::ACTIVITYPUB, Protocol::DFRN, Protocol::DIASPORA, Protocol::OSTATUS];
 
                if (!empty($last_uriid)) {