Merge pull request #9321 from annando/trending-public

Trending tags: Ensure to only count public posts from the public contact
2022.09-rc
Tobias Diekershoff 2020-09-30 07:22:51 +02:00 zatwierdzone przez GitHub
commit 0b37f1d56c
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 4AEE18F83AFDEB23
1 zmienionych plików z 2 dodań i 2 usunięć

Wyświetl plik

@ -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);