Improved profile page, improved "limit" handling (#5639)

* Improved profile page, improved "limit" handling

* Update will now work again

* Update will work now
This commit is contained in:
Michael Vogel 2018-08-20 06:26:05 +02:00 committed by Tobias Diekershoff
parent 47c2565917
commit 16a081871c
6 changed files with 34 additions and 55 deletions

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