The old pager is removed

This commit is contained in:
Michael 2017-02-27 21:46:37 +00:00
commit 997e94555b
6 changed files with 6 additions and 99 deletions

View file

@ -48,27 +48,6 @@ function community_content(App $a, $update = 0) {
// Only public posts can be shown
// OR your own posts if you are a logged in member
if(get_config('system', 'old_pager')) {
$r = qu("SELECT COUNT(distinct(`item`.`uri`)) AS `total`
FROM `item` INNER JOIN `contact` ON `contact`.`id` = `item`.`contact-id`
AND `contact`.`blocked` = 0 AND `contact`.`pending` = 0
INNER JOIN `user` ON `user`.`uid` = `item`.`uid` AND `user`.`hidewall` = 0
WHERE `item`.`visible` = 1 AND `item`.`deleted` = 0 and `item`.`moderated` = 0
AND `item`.`allow_cid` = '' AND `item`.`allow_gid` = ''
AND `item`.`deny_cid` = '' AND `item`.`deny_gid` = ''
AND `item`.`private` = 0 AND `item`.`wall` = 1"
);
if (dbm::is_result($r))
$a->set_pager_total($r[0]['total']);
if(! $r[0]['total']) {
info( t('No results.') . EOL);
return $o;
}
}
$r = community_getitems($a->pager['start'], $a->pager['itemspage']);
if (! dbm::is_result($r)) {
@ -107,11 +86,7 @@ function community_content(App $a, $update = 0) {
$o .= conversation($a,$s,'community',$update);
if(!get_config('system', 'old_pager')) {
$o .= alt_pager($a,count($r));
} else {
$o .= paginate($a);
}
$o .= alt_pager($a,count($r));
return $o;
}