From f8d5a40fea1aa7016231f9bc3c1617c957792f02 Mon Sep 17 00:00:00 2001 From: Matt Blenkinsop Date: Wed, 19 Jul 2023 10:50:55 +0100 Subject: [PATCH] Revert "Bug 33497: Don't get host items if the MARC record is invalid" This reverts commit a4896e3832fba1ca6a9e388c47c925dc225ddcf1. --- catalogue/detail.pl | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/catalogue/detail.pl b/catalogue/detail.pl index 62c125669c..af6fc0162d 100755 --- a/catalogue/detail.pl +++ b/catalogue/detail.pl @@ -194,16 +194,13 @@ my $all_items = $biblio->items->search_ordered; my @items; my $patron = Koha::Patrons->find( $borrowernumber ); $params->{ itemlost } = 0 if $patron->category->hidelostitems && !$showallitems; -my $items_params = { - ( $invalid_marc_record ? () : ( host_items => 1 ) ), -}; -my $items = $biblio->items($items_params)->search_ordered( $params, { prefetch => ['issue','current_branchtransfers'] } ); +my $items = $biblio->items({ host_items => 1 })->search_ordered( $params, { prefetch => ['issue','current_branchtransfers'] } ); # flag indicating existence of at least one item linked via a host record my $hostrecords = $biblio->host_items->count; my $dat = &GetBiblioData($biblionumber); -$dat->{'count'} = $biblio->items($items_params)->count; +$dat->{'count'} = $biblio->items({ host_items => 1 })->count; $dat->{'showncount'} = $items->count; $dat->{'hiddencount'} = $dat->{'count'} - $dat->{'showncount'}; -- 2.39.5