From 371a65d3616b82f9418b12d0eed5c0d5715e16fd Mon Sep 17 00:00:00 2001 From: NOrtmann1 Date: Sat, 13 Jun 2026 11:47:12 +0200 Subject: [PATCH] Update search-results.php --- content/search-results.php | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/content/search-results.php b/content/search-results.php index 35d9097..3cfa52e 100644 --- a/content/search-results.php +++ b/content/search-results.php @@ -5,6 +5,13 @@ if (session_status() === PHP_SESSION_NONE) { $results = $_SESSION["search_results"] ?? []; $query = $_SESSION["search_query"] ?? ""; + +$limit = isset($_GET['limit']) ? (int)$_GET['limit'] : 10; +if (!in_array($limit, [10, 20, 50, 100])) { + $limit = 10; +} +$results = array_slice($results, 0, $limit); + $resultCount = count($results); ?> @@ -19,7 +26,7 @@ $resultCount = count($results);