From d7647052f20104b70ba6b02d1535874fb9ab3b61 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 --- 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 fb13bc5c56..e3b8ea0a2c 100755 --- a/opac/opac-search.pl +++ b/opac/opac-search.pl @@ -759,7 +759,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