Commit 1353bd27 authored by Alexander Butenko's avatar Alexander Butenko

paginate: replace round() with ceil()

parent 7d08fbcc
......@@ -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