Commit c0e35756 authored by Alexander Butenko's avatar Alexander Butenko

Merge pull request #361 from avbdr/master

paginate: replace round() with ceil()
parents f87a281c 1353bd27
......@@ -1865,7 +1865,7 @@ class MysqliDb
public function paginate ($table, $page, $fields = null) {
$offset = $this->pageLimit * ($page - 1);
$res = $this->withTotalCount()->get ($table, Array ($offset, $this->pageLimit), $fields);
$this->totalPages = round($this->totalCount / $this->pageLimit);
$this->totalPages = ceil($this->totalCount / $this->pageLimit);
return $res;
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment