]> git.mxchange.org Git - friendica.git/commitdiff
Trending tags: Ensure to only count public posts
authorMichael <heluecht@pirati.ca>
Tue, 29 Sep 2020 19:49:40 +0000 (19:49 +0000)
committerMichael <heluecht@pirati.ca>
Tue, 29 Sep 2020 19:49:40 +0000 (19:49 +0000)
src/Model/Tag.php

index c4ff34c18a5b62d9ee86787e3451f5ffccaf967e..c661892edf6186f8866f1f4c04f9dc63272a325e 100644 (file)
@@ -514,9 +514,9 @@ class Tag
        {
                $tagsStmt = DBA::p("SELECT `name` AS `term`, COUNT(*) AS `score`
                        FROM `tag-search-view`
-                       WHERE `private` = ? AND `received` > DATE_SUB(NOW(), INTERVAL ? HOUR)
+                       WHERE `private` = ? AND `uid` = ? AND `received` > DATE_SUB(NOW(), INTERVAL ? HOUR)
                        GROUP BY `term` ORDER BY `score` DESC LIMIT ?",
-                       Item::PUBLIC, $period, $limit);
+                       Item::PUBLIC, 0, $period, $limit);
 
                if (DBA::isResult($tagsStmt)) {
                        $tags = DBA::toArray($tagsStmt);