From b75d045eec4f04d6eb0528d04ed771e479d2f714 Mon Sep 17 00:00:00 2001 From: Ro Date: Thu, 8 Apr 2021 15:38:31 -0700 Subject: [PATCH] fixed pagination indexing --- brain/data/Book.inc.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/brain/data/Book.inc.php b/brain/data/Book.inc.php index 45a6c1a..3c547c6 100644 --- a/brain/data/Book.inc.php +++ b/brain/data/Book.inc.php @@ -63,6 +63,10 @@ class Book $limit = count($filtered) - 1; } $range = $page * $limit - $limit; + + if ($range != 0) { + $range = $range + 1; + } for ($i = 0; $i <= $limit; $i++) { if (isset($filtered[$i + $range])) { array_push($folder, $filtered[$i + $range]);