fixed pagination indexing

This commit is contained in:
Ro 2021-04-08 15:38:31 -07:00
parent 8e9b6ac422
commit b75d045eec

View file

@ -63,6 +63,10 @@ class Book
$limit = count($filtered) - 1; $limit = count($filtered) - 1;
} }
$range = $page * $limit - $limit; $range = $page * $limit - $limit;
if ($range != 0) {
$range = $range + 1;
}
for ($i = 0; $i <= $limit; $i++) { for ($i = 0; $i <= $limit; $i++) {
if (isset($filtered[$i + $range])) { if (isset($filtered[$i + $range])) {
array_push($folder, $filtered[$i + $range]); array_push($folder, $filtered[$i + $range]);