]> git.mxchange.org Git - friendica.git/blobdiff - mod/community.php
Improved profile page, improved "limit" handling (#5639)
[friendica.git] / mod / community.php
index cb4f69c9173c8e87158d1a8cb0adaa0a9380acc3..f148191bbcf4ca00705372be4e9a90d5922ca888 100644 (file)
@@ -195,15 +195,14 @@ function community_getitems($start, $itemspage, $content)
                        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);
        }