From 1b8f515d7bd0642f5c8b83c7d9b3a364caa0b5f9 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Mon, 14 Dec 2015 11:46:29 +0100 Subject: [PATCH] fix division by zero if all hits are shown --- out/out.Search.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/out/out.Search.php b/out/out.Search.php index 8c056ad6c..2d1d255f3 100644 --- a/out/out.Search.php +++ b/out/out.Search.php @@ -352,7 +352,7 @@ if(isset($_GET["fullsearch"]) && $_GET["fullsearch"]) { $pageNumber = (int) $_GET["pg"]; } elseif (!strcasecmp($_GET["pg"], "all")) { - $limit = 0; + // $limit = 0; } } @@ -385,7 +385,7 @@ if(isset($_GET["fullsearch"]) && $_GET["fullsearch"]) { $totalPages = (int) (count($entries)/$limit); if(count($entries)%$limit) $totalPages++; - if($limit > 0) + if (strcasecmp($_GET["pg"], "all")) $entries = array_slice($entries, ($pageNumber-1)*$limit, $limit); // }}} }