mirror of
https://github.com/friendica/friendica
synced 2024-12-23 18:00:17 +00:00
Merge pull request #5163 from annando/bugfix-user-item
Fix SQL error in tagcloud
This commit is contained in:
commit
0eafea86ed
1 changed files with 2 additions and 0 deletions
|
@ -91,11 +91,13 @@ class TagCloud
|
||||||
// Fetch tags
|
// Fetch tags
|
||||||
$r = dba::p("SELECT `term`, COUNT(`term`) AS `total` FROM `term`
|
$r = dba::p("SELECT `term`, COUNT(`term`) AS `total` FROM `term`
|
||||||
LEFT JOIN `item` ON `term`.`oid` = `item`.`id`
|
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` = ?
|
WHERE `term`.`uid` = ? AND `term`.`type` = ?
|
||||||
AND `term`.`otype` = ?
|
AND `term`.`otype` = ?
|
||||||
AND $item_condition $sql_options
|
AND $item_condition $sql_options
|
||||||
GROUP BY `term` ORDER BY `total` DESC $limit",
|
GROUP BY `term` ORDER BY `total` DESC $limit",
|
||||||
$uid,
|
$uid,
|
||||||
|
$uid,
|
||||||
$type,
|
$type,
|
||||||
TERM_OBJ_POST
|
TERM_OBJ_POST
|
||||||
);
|
);
|
||||||
|
|
Loading…
Reference in a new issue