This commit is contained in:
Simon Vieille 2016-01-28 10:38:52 +01:00
parent a72c8a0376
commit 21df13f3c3
1 changed files with 8 additions and 1 deletions

View File

@ -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 = [];