From 5324327630d4838a997cb1cc0b102d903ab9b9b8 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 Content-Type: text/plain; charset=utf-8 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 --- 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.20.1