Fix SQL error in tagcloud

pull/5163/head
Michael 2018-06-02 17:07:28 +00:00
rodzic 69300291f0
commit 41423e578a
1 zmienionych plików z 2 dodań i 0 usunięć

Wyświetl plik

@ -91,11 +91,13 @@ class TagCloud
// Fetch tags
$r = dba::p("SELECT `term`, COUNT(`term`) AS `total` FROM `term`
LEFT JOIN `item` ON `term`.`oid` = `item`.`id`
LEFT JOIN `user-item` ON `user-item`.`iid` = `item`.`id` AND `user-item`.`uid` = ?
WHERE `term`.`uid` = ? AND `term`.`type` = ?
AND `term`.`otype` = ?
AND $item_condition $sql_options
GROUP BY `term` ORDER BY `total` DESC $limit",
$uid,
$uid,
$type,
TERM_OBJ_POST
);