Fixed JobPager - returns integers, not floats
This commit is contained in:
parent
4b907f6121
commit
d30dd3c05a
1 changed files with 4 additions and 4 deletions
|
@ -36,15 +36,15 @@ class JobPager
|
||||||
$pageSize = $this->getPageSize();
|
$pageSize = $this->getPageSize();
|
||||||
$pageNumber = $this->getPageNumber();
|
$pageNumber = $this->getPageNumber();
|
||||||
|
|
||||||
$pageCount = ceil($totalEntityCount / $pageSize);
|
$pageCount = (int) ceil($totalEntityCount / $pageSize);
|
||||||
$pageNumber = $this->getPageNumber();
|
$pageNumber = $this->getPageNumber();
|
||||||
$pageNumber = min($pageCount, $pageNumber);
|
$pageNumber = min($pageCount, $pageNumber);
|
||||||
|
|
||||||
$ret = new StdClass;
|
$ret = new StdClass;
|
||||||
$ret->entities = $entities;
|
$ret->entities = $entities;
|
||||||
$ret->entityCount = $totalEntityCount;
|
$ret->entityCount = (int) $totalEntityCount;
|
||||||
$ret->page = $pageNumber;
|
$ret->page = (int) $pageNumber;
|
||||||
$ret->pageCount = $pageCount;
|
$ret->pageCount = (int) $pageCount;
|
||||||
return $ret;
|
return $ret;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue