From 3fa57da0aacb667022d97fe558f48499795d75d4 Mon Sep 17 00:00:00 2001 From: Lucas Gass Date: Fri, 9 Jan 2026 20:47:53 +0000 Subject: [PATCH] Bug 35211: Move other_holdings_count outside of loop so it is only calculated once --- catalogue/detail.pl | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/catalogue/detail.pl b/catalogue/detail.pl index eca6dce2ce2..1f3204ecd37 100755 --- a/catalogue/detail.pl +++ b/catalogue/detail.pl @@ -383,11 +383,13 @@ if ( C4::Context->preference('SeparateHoldingsByGroup') ) { $total_group_holdings_count += $group_holdings_count; push @lib_groups, $group; - $other_holdings_count = ( $items_to_display->count ) - $total_group_holdings_count; } } } + #only need to calculate the other_holdings_count once + $other_holdings_count = ( $items_to_display->count ) - $total_group_holdings_count; + $template->param( lib_groups => \@lib_groups, holdings_count_hash => \%holdings_count, -- 2.39.5