From 22d93d10a8a054840e45960afbbaea770b2aa7a4 Mon Sep 17 00:00:00 2001 From: Henri-Damien LAURENT Date: Mon, 7 Dec 2009 11:18:07 +0100 Subject: [PATCH] Revert "MT 2298 : Fix hidelostitems" This reverts commit 481ccf6872622e1d00ed92b82dd8abd6930b6931. --- C4/Search.pm | 10 ++-------- opac/opac-search.pl | 4 ++-- 2 files changed, 4 insertions(+), 10 deletions(-) diff --git a/C4/Search.pm b/C4/Search.pm index dea8b57b07..65e516a5b4 100644 --- a/C4/Search.pm +++ b/C4/Search.pm @@ -1335,7 +1335,7 @@ Format results in a form suitable for passing to the template # IMO this subroutine is pretty messy still -- it's responsible for # building the HTML output for the template sub searchResults { - my ( $searchdesc, $hits, $results_per_page, $offset, $scan, @marcresults, $hidelostitems ) = @_; + my ( $searchdesc, $hits, $results_per_page, $offset, $scan, @marcresults ) = @_; my $dbh = C4::Context->dbh; my @newresults; @@ -1525,7 +1525,6 @@ sub searchResults { foreach my $code ( keys %subfieldstosearch ) { $item->{$code} = $field->subfield( $subfieldstosearch{$code} ); } - my $hbranch = C4::Context->preference('HomeOrHoldingBranch') eq 'homebranch' ? 'homebranch' : 'holdingbranch'; my $otherbranch = C4::Context->preference('HomeOrHoldingBranch') eq 'homebranch' ? 'holdingbranch' : 'homebranch'; # set item's branch name, use HomeOrHoldingBranch syspref first, fall back to the other one @@ -1701,13 +1700,8 @@ sub searchResults { $oldbiblio->{orderedcount} = $ordered_count; $oldbiblio->{isbn} =~ s/-//g; # deleting - in isbn to enable amazon content - push( @newresults, $oldbiblio ) - if(not $hidelostitems - or (($items_count > $itemlost_count ) - && $hidelostitems)); - + push( @newresults, $oldbiblio ); } - return @newresults; } diff --git a/opac/opac-search.pl b/opac/opac-search.pl index 558604a7e1..74f8fe5ecf 100755 --- a/opac/opac-search.pl +++ b/opac/opac-search.pl @@ -412,11 +412,11 @@ for (my $i=0;$i<=@servers;$i++) { # we want as specified by $offset and $results_per_page, # we need to set the offset parameter of searchResults to 0 my @group_results = searchResults( $query_desc, $group->{'group_count'},$results_per_page, 0, $scan, - @{ $group->{"RECORDS"} }, C4::Context->preference('hidelostitems')); + @{ $group->{"RECORDS"} }); push @newresults, { group_label => $group->{'group_label'}, GROUP_RESULTS => \@group_results }; } } else { - @newresults = searchResults( $query_desc,$hits,$results_per_page,$offset,$scan,@{$results_hashref->{$server}->{"RECORDS"}},, C4::Context->preference('hidelostitems')); + @newresults = searchResults( $query_desc,$hits,$results_per_page,$offset,$scan,@{$results_hashref->{$server}->{"RECORDS"}}); } my $tag_quantity; if (C4::Context->preference('TagsEnabled') and -- 2.39.5