Fix query return type in Widget\TagCloud
This commit is contained in:
parent
49c9b6f9ff
commit
ddad9721c0
|
@ -89,7 +89,7 @@ class TagCloud
|
||||||
}
|
}
|
||||||
|
|
||||||
// Fetch tags
|
// Fetch tags
|
||||||
$r = DBA::p("SELECT `term`, COUNT(`term`) AS `total` FROM `term`
|
$tag_stmt = 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`
|
||||||
WHERE `term`.`uid` = ? AND `term`.`type` = ?
|
WHERE `term`.`uid` = ? AND `term`.`type` = ?
|
||||||
AND `term`.`otype` = ?
|
AND `term`.`otype` = ?
|
||||||
|
@ -100,10 +100,12 @@ class TagCloud
|
||||||
$type,
|
$type,
|
||||||
TERM_OBJ_POST
|
TERM_OBJ_POST
|
||||||
);
|
);
|
||||||
if (!DBA::isResult($r)) {
|
if (!DBA::isResult($tag_stmt)) {
|
||||||
return [];
|
return [];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$r = DBA::toArray($tag_stmt);
|
||||||
|
|
||||||
return self::tagCalc($r);
|
return self::tagCalc($r);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue