pager
This commit is contained in:
parent
a72c8a0376
commit
21df13f3c3
|
@ -72,7 +72,7 @@ function getProjectNumberOfPages($maxPerPage)
|
|||
|
||||
$result = $query->fetch();
|
||||
|
||||
return ceil($result['total'] / $maxPerPage);
|
||||
return (int) ceil($result['total'] / $maxPerPage);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -88,6 +88,13 @@ function getCommentsByProject($id)
|
|||
|
||||
// Prévoir une fonction pour enregistrer un commentaire
|
||||
|
||||
/**
|
||||
* Génère et retourne une pagination
|
||||
*
|
||||
* @param int $page La page courrante
|
||||
* @param int $numberOfPages Le nombre de pages
|
||||
* @return array Les pages
|
||||
*/
|
||||
function getProjectsPager($page, $numberOfPages)
|
||||
{
|
||||
$pages = [];
|
||||
|
|
Loading…
Reference in a new issue