From 65f88f08b43aafbecdfe4ca5030de69dfcc6e22b Mon Sep 17 00:00:00 2001 From: ghost Date: Sun, 8 Aug 2021 13:00:45 +0300 Subject: [PATCH 1/2] fix pagination start value --- public/index.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/public/index.php b/public/index.php index 7761b0c..2077fe5 100755 --- a/public/index.php +++ b/public/index.php @@ -32,7 +32,11 @@ if (SEF_MODE && isset($_SERVER['QUERY_STRING'])) { } } -$limit = PAGE_LIMIT * $page; +if ($page > 1) { + $limit = PAGE_LIMIT * $page - PAGE_LIMIT; +} else { + $limit = PAGE_LIMIT * $page; +} $db = new MySQL(); From bb19092d82ab51f119be2b093d82a2e19ff07339 Mon Sep 17 00:00:00 2001 From: ghost Date: Sun, 8 Aug 2021 13:03:11 +0300 Subject: [PATCH 2/2] fix pagination condition --- public/index.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/index.php b/public/index.php index 2077fe5..287cf2e 100755 --- a/public/index.php +++ b/public/index.php @@ -32,7 +32,7 @@ if (SEF_MODE && isset($_SERVER['QUERY_STRING'])) { } } -if ($page > 1) { +if ($page > 0) { $limit = PAGE_LIMIT * $page - PAGE_LIMIT; } else { $limit = PAGE_LIMIT * $page;