]> git.mxchange.org Git - friendica.git/commitdiff
Fix SQL error in tagcloud
authorMichael <heluecht@pirati.ca>
Sat, 2 Jun 2018 17:07:28 +0000 (17:07 +0000)
committerMichael <heluecht@pirati.ca>
Sat, 2 Jun 2018 17:07:28 +0000 (17:07 +0000)
src/Content/Widget/TagCloud.php

index 19ea3eea0485eed8e3f445bda7b3fe94bdc3f0a9..7d96587c258fadd8d8ee1ff40583884648fb3ebd 100644 (file)
@@ -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
                );