From 7ea9cbffcd099226a8cdcc24e80716e2c84bbb39 Mon Sep 17 00:00:00 2001 From: ghost Date: Mon, 27 Nov 2023 17:27:40 +0200 Subject: [PATCH] fix found totals --- src/webui/search.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/webui/search.php b/src/webui/search.php index 6a2fd32..6f468e2 100644 --- a/src/webui/search.php +++ b/src/webui/search.php @@ -116,6 +116,9 @@ switch (true) $query = $index->search($q); } +// Get found +$found = empty($q) ? $total : $query->get()->getTotal(); + // Search request begin $results = $query->offset($p * $config->webui->pagination->limit - $config->webui->pagination->limit) ->limit($config->webui->pagination->limit) @@ -311,7 +314,7 @@ $results = $query->offset($p * $config->webui->pagination->limit - $config->webu
-
getTotal())) ?>
+