Clean up tag claud (remove "item_condition()" call)
This commit is contained in:
parent
c1d9c29eea
commit
5bfd424fd2
|
@ -74,7 +74,6 @@ class TagCloud
|
||||||
*/
|
*/
|
||||||
private static function tagadelic($uid, $count = 0, $owner_id = 0, $flags = '', $type = TERM_HASHTAG)
|
private static function tagadelic($uid, $count = 0, $owner_id = 0, $flags = '', $type = TERM_HASHTAG)
|
||||||
{
|
{
|
||||||
$item_condition = item_condition();
|
|
||||||
$sql_options = item_permissions_sql($uid);
|
$sql_options = item_permissions_sql($uid);
|
||||||
$limit = $count ? sprintf('LIMIT %d', intval($count)) : '';
|
$limit = $count ? sprintf('LIMIT %d', intval($count)) : '';
|
||||||
|
|
||||||
|
@ -91,13 +90,12 @@ 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`.`visible` AND NOT `item`.`deleted` AND NOT `item`.`moderated`
|
||||||
|
$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 New Issue
Block a user