From 347f243c5864685d119f76fa4ec1cea3ebacef11 Mon Sep 17 00:00:00 2001 From: Knah Tsaeb Date: Tue, 19 Mar 2024 16:59:01 +0100 Subject: [PATCH] Fix pagination nav (prev, next) --- app/Controllers/Backend.php | 3 ++- app/Controllers/GenHmac.php | 2 +- tpl/infos.php | 4 ++++ 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/app/Controllers/Backend.php b/app/Controllers/Backend.php index 5bf19d7..72debde 100644 --- a/app/Controllers/Backend.php +++ b/app/Controllers/Backend.php @@ -131,6 +131,7 @@ class Backend { $inError = $conx->getInError(); $inQueue = $this->getInQueue(); $start = $this->start; + $max = $this->max; $next = $start + $max; $previous = $start - ($max); @@ -141,7 +142,7 @@ class Backend { } if ($previous < 0) { - $previous = 0; + $previous = null; } require __DIR__ . '/../../tpl/infos.php'; diff --git a/app/Controllers/GenHmac.php b/app/Controllers/GenHmac.php index 3f6059e..072fcd5 100644 --- a/app/Controllers/GenHmac.php +++ b/app/Controllers/GenHmac.php @@ -3,6 +3,6 @@ namespace App\Controllers; class GenHmac { function index($params, $conf) { - echo hash_hmac('sha1', $params->url, $conf['key']); + echo hash_hmac('sha1', $params->url, $conf->key); } } \ No newline at end of file diff --git a/tpl/infos.php b/tpl/infos.php index 7b1160a..89fe1cc 100644 --- a/tpl/infos.php +++ b/tpl/infos.php @@ -54,8 +54,12 @@ use App\Utils\Domains;
+ 0) : ?> « Previous + + Next » +