From d0b36781a86e99d82d1995e6cb9b972a4eed62c0 Mon Sep 17 00:00:00 2001 From: Michael Date: Tue, 29 Sep 2020 19:49:40 +0000 Subject: [PATCH] Trending tags: Ensure to only count public posts --- src/Model/Tag.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Model/Tag.php b/src/Model/Tag.php index c4ff34c18..c661892ed 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);