View | Details | Raw Unified | Return to bug 27113
Collapse All | Expand All

(-)a/opac/svc/elasticsearch/opac-elasticsearch.pl (-6 / +4 lines)
Lines 10-16 use Koha::SearchEngine::Elasticsearch::Browse; Link Here
10
10
11
use Koha::Items;
11
use Koha::Items;
12
use C4::Context;
12
use C4::Context;
13
use C4::Biblio qw ( GetMarcBiblio );
13
use C4::Biblio;
14
use Koha::Biblios;
14
15
15
my $browser = Koha::SearchEngine::Elasticsearch::Browse->new( { index => 'biblios' } );
16
my $browser = Koha::SearchEngine::Elasticsearch::Browse->new( { index => 'biblios' } );
16
my $cgi = CGI->new;
17
my $cgi = CGI->new;
Lines 60-69 sub filterAutocomplete { Link Here
60
        # marc field 942$n set to true and OpacSuppression preference on
61
        # marc field 942$n set to true and OpacSuppression preference on
61
        if (C4::Context->preference('OpacSuppression')) {
62
        if (C4::Context->preference('OpacSuppression')) {
62
          for ( my $i = 0; $i < scalar @{$hitlist}; $i++ ) {
63
          for ( my $i = 0; $i < scalar @{$hitlist}; $i++ ) {
63
            my $record = GetMarcBiblio({
64
            my $biblio = Koha::Biblios->find($hitlist->[$i]->{ "_id" });
64
              biblionumber => $hitlist->[$i]->{ "_id" },
65
            my $record = $biblio->metadata->record;
65
              opac         => 1
66
            });
67
            my $opacsuppressionfield = '942';
66
            my $opacsuppressionfield = '942';
68
            my $opacsuppressionfieldvalue = $record->field($opacsuppressionfield);
67
            my $opacsuppressionfieldvalue = $record->field($opacsuppressionfield);
69
            if ( $opacsuppressionfieldvalue &&
68
            if ( $opacsuppressionfieldvalue &&
70
- 

Return to bug 27113