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

(-)a/Koha/Biblio.pm (+1 lines)
Lines 510-515 sub get_marc_components { Link Here
510
                {
510
                {
511
                    type    => 'error',
511
                    type    => 'error',
512
                    message => 'component_search',
512
                    message => 'component_search',
513
                    payload => $error,
513
                }
514
                }
514
            );
515
            );
515
        }
516
        }
(-)a/catalogue/detail.pl (-3 / +2 lines)
Lines 201-207 my $show_analytics; Link Here
201
if ( $showcomp eq 'both' || $showcomp eq 'staff' ) {
201
if ( $showcomp eq 'both' || $showcomp eq 'staff' ) {
202
    if ( my $components = $biblio->get_marc_components(C4::Context->preference('MaxComponentRecords')) ) {
202
    if ( my $components = $biblio->get_marc_components(C4::Context->preference('MaxComponentRecords')) ) {
203
        $show_analytics = 1 if @{$components}; # just show link when having results
203
        $show_analytics = 1 if @{$components}; # just show link when having results
204
        $template->param( analytics_error => 1 ) if @{$biblio->messages};
204
        $template->param( analytics_error => 1 ) if grep { $_->message eq 'component_search' } @{$biblio->messages};
205
        my $parts;
205
        my $parts;
206
        for my $part ( @{$components} ) {
206
        for my $part ( @{$components} ) {
207
            $part = C4::Search::new_record_from_zebra( 'biblioserver', $part );
207
            $part = C4::Search::new_record_from_zebra( 'biblioserver', $part );
Lines 222-228 if ( $showcomp eq 'both' || $showcomp eq 'staff' ) { Link Here
222
    }
222
    }
223
} else { # check if we should show analytics anyway
223
} else { # check if we should show analytics anyway
224
    $show_analytics = 1 if @{$biblio->get_marc_components(1)}; # count matters here, results does not
224
    $show_analytics = 1 if @{$biblio->get_marc_components(1)}; # count matters here, results does not
225
    $template->param( analytics_error => 1 ) if @{$biblio->messages};
225
    $template->param( analytics_error => 1 ) if grep { $_->message eq 'component_search' } @{$biblio->messages};
226
}
226
}
227
227
228
# XSLT processing of some stuff
228
# XSLT processing of some stuff
229
- 

Return to bug 11175