Move itemCount parameter from constructor to renderFull()

- Remove Pager->itemCount property and Pager->setItemCount() method
- Update usage
This commit is contained in:
Hypolite Petovan
2018-10-24 11:42:59 -04:00
parent 14237a9599
commit 7c0b591043
12 changed files with 70 additions and 80 deletions

View File

@@ -283,7 +283,7 @@ function message_content(App $a)
$total = $r[0]['total'];
}
$pager = new Pager($a->query_string, $total);
$pager = new Pager($a->query_string);
$r = get_messages(local_user(), $pager->getStart(), $pager->getItemsPerPage());
@@ -294,7 +294,7 @@ function message_content(App $a)
$o .= render_messages($r, 'mail_list.tpl');
$o .= $pager->renderFull();
$o .= $pager->renderFull($total);
return $o;
}