From: Michael Date: Tue, 29 Sep 2020 19:49:40 +0000 (+0000) Subject: Trending tags: Ensure to only count public posts X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=d0b36781a86e99d82d1995e6cb9b972a4eed62c0;p=friendica.git Trending tags: Ensure to only count public posts --- diff --git a/src/Model/Tag.php b/src/Model/Tag.php index c4ff34c18a..c661892edf 100644 --- a/src/Model/Tag.php +++ b/src/Model/Tag.php @@ -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);