INNER JOIN `contact` AS `author` ON `author`.`id`=`item`.`author-id`
WHERE `thread`.`visible` AND NOT `thread`.`deleted` AND NOT `thread`.`moderated`
AND NOT `thread`.`private` AND `thread`.`wall` AND `thread`.`origin`
- ORDER BY `thread`.`commented` DESC LIMIT " . intval($start) . ", " . intval($itemspage)
- );
+ ORDER BY `thread`.`commented` DESC LIMIT ?, ?", $start, $itemspage);
return DBA::toArray($r);
} elseif ($content == 'global') {
$r = DBA::p("SELECT `uri` FROM `thread`
INNER JOIN `item` ON `item`.`id` = `thread`.`iid`
INNER JOIN `contact` AS `author` ON `author`.`id`=`item`.`author-id`
WHERE `thread`.`uid` = 0 AND NOT `author`.`hidden` AND NOT `author`.`blocked`
- ORDER BY `thread`.`commented` DESC LIMIT " . intval($start) . ", " . intval($itemspage));
+ ORDER BY `thread`.`commented` DESC LIMIT ?, ?", $start, $itemspage);
return DBA::toArray($r);
}