Revert "MT 2298 : Fix hidelostitems"

This reverts commit 481ccf6872.
This commit is contained in:
Henri-Damien LAURENT 2009-12-07 11:18:07 +01:00
parent 2279380b54
commit 22d93d10a8
2 changed files with 4 additions and 10 deletions

View File

@ -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;
}

View File

@ -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