]> git.mxchange.org Git - friendica.git/commitdiff
Merge pull request #5163 from annando/bugfix-user-item
authorHypolite Petovan <mrpetovan@gmail.com>
Sat, 2 Jun 2018 17:49:58 +0000 (13:49 -0400)
committerGitHub <noreply@github.com>
Sat, 2 Jun 2018 17:49:58 +0000 (13:49 -0400)
Fix SQL error in tagcloud

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