From 13982926c79a09306423bd95ce9e3143c75fb1c9 Mon Sep 17 00:00:00 2001 From: Marcel de Rooy Date: Tue, 19 Jul 2022 11:27:55 +0000 Subject: [PATCH] Bug 31186: Fix the hidingrules test for result numbering We should not test the $hidingrules variable but the number of keys it contains. Test plan: Clear OpacHiddenItems. Check with and without this patch search result numbering on the OPAC. Signed-off-by: Marcel de Rooy Signed-off-by: Nick Clemens Signed-off-by: Tomas Cohen Arazi (cherry picked from commit d7647052f20104b70ba6b02d1535874fb9ab3b61) Signed-off-by: Lucas Gass (cherry picked from commit b8f34e1acce7fe0a9b9698e30c210248107973f9) Signed-off-by: Arthur Suzuki --- opac/opac-search.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/opac/opac-search.pl b/opac/opac-search.pl index 3482b669f4..c57288cf29 100755 --- a/opac/opac-search.pl +++ b/opac/opac-search.pl @@ -760,7 +760,7 @@ for (my $i=0;$i<@servers;$i++) { $template->param(searchdesc => 1); } $template->param(results_per_page => $results_per_page); - my $hide = ($hidingrules) ? 1 : 0; + my $hide = keys %$hidingrules ? 1 : 0; $template->param( SEARCH_RESULTS => \@newresults, -- 2.39.5