Bug 33167: (RMAINT fix) Revert 33167
Bug 33167 was reverted from 22.11.x but the revert does not seem to have removed all lines causing failing tests. This patch removes remaining lines and refactors the code to its pre-33167 state
This commit is contained in:
parent
80fe98aff7
commit
0b4b871f6d
1 changed files with 6 additions and 5 deletions
|
@ -193,8 +193,12 @@ my $itemtypes = { map { $_->itemtype => $_ } @{ Koha::ItemTypes->search_with_loc
|
|||
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 = $biblio->items->search_ordered( $params )->as_list;
|
||||
while ( my $item = $all_items->next ) {
|
||||
push @items, $item
|
||||
unless $item->itemlost
|
||||
&& $patron->category->hidelostitems
|
||||
&& !$showallitems;
|
||||
}
|
||||
|
||||
# flag indicating existence of at least one item linked via a host record
|
||||
my $hostrecords;
|
||||
|
@ -206,9 +210,6 @@ if ( $hostitems->count ) {
|
|||
}
|
||||
|
||||
my $dat = &GetBiblioData($biblionumber);
|
||||
$dat->{'count'} = $biblio->items->count + $hostitems->count;
|
||||
$dat->{'showncount'} = scalar @items;
|
||||
$dat->{'hiddencount'} = $dat->{'count'} - $dat->{'showncount'};
|
||||
|
||||
#is biblio a collection and are bundles enabled
|
||||
my $leader = $marc_record->leader();
|
||||
|
|
Loading…
Reference in a new issue