The old pager is removed

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

View file

@ -675,15 +675,6 @@ function posts_from_gcontact(App $a, $gcontact_id) {
else
$sql = "`item`.`uid` = %d";
if(get_config('system', 'old_pager')) {
$r = q("SELECT COUNT(*) AS `total` FROM `item`
WHERE `gcontact-id` = %d and $sql",
intval($gcontact_id),
intval(local_user()));
$a->set_pager_total($r[0]['total']);
}
$r = q("SELECT `item`.`uri`, `item`.*, `item`.`id` AS `item_id`,
`author-name` AS `name`, `owner-avatar` AS `photo`,
`owner-link` AS `url`, `owner-avatar` AS `thumb`
@ -699,11 +690,7 @@ function posts_from_gcontact(App $a, $gcontact_id) {
$o = conversation($a,$r,'community',false);
if(!get_config('system', 'old_pager')) {
$o .= alt_pager($a,count($r));
} else {
$o .= paginate($a);
}
$o .= alt_pager($a,count($r));
return $o;
}
@ -736,15 +723,6 @@ function posts_from_contact_url(App $a, $contact_url) {
$author_id = intval($r[0]["author-id"]);
if (get_config('system', 'old_pager')) {
$r = q("SELECT COUNT(*) AS `total` FROM `item`
WHERE `author-id` = %d and $sql",
intval($author_id),
intval(local_user()));
$a->set_pager_total($r[0]['total']);
}
$r = q(item_query()." AND `item`.`author-id` = %d AND ".$sql.
" ORDER BY `item`.`created` DESC LIMIT %d, %d",
intval($author_id),
@ -755,11 +733,7 @@ function posts_from_contact_url(App $a, $contact_url) {
$o = conversation($a,$r,'community',false);
if (!get_config('system', 'old_pager')) {
$o .= alt_pager($a,count($r));
} else {
$o .= paginate($a);
}
$o .= alt_pager($a,count($r));
return $o;
}