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

(-)a/Koha/Biblio.pm (-1 / +2 lines)
Lines 952-958 sub get_components_query { Link Here
952
        $cleaned_title = $builder->clean_search_term($cleaned_title);
952
        $cleaned_title = $builder->clean_search_term($cleaned_title);
953
        $searchstr     = qq#Host-item:("$cleaned_title")#;
953
        $searchstr     = qq#Host-item:("$cleaned_title")#;
954
    }
954
    }
955
    my ( $error, $query, $query_str ) = $builder->build_query_compat( undef, [$searchstr], undef, undef, [$sort], 0 );
955
    my ( $error, $query, $query_str ) =
956
        $builder->build_query_compat( undef, [ $searchstr // '' ], undef, undef, [$sort], 0 );
956
    if ($error) {
957
    if ($error) {
957
        warn $error;
958
        warn $error;
958
        return;
959
        return;
(-)a/catalogue/detail.pl (-4 / +4 lines)
Lines 247-256 foreach my $subscription (@subscriptions) { Link Here
247
my $showcomp = C4::Context->preference('ShowComponentRecords');
247
my $showcomp = C4::Context->preference('ShowComponentRecords');
248
my $show_analytics;
248
my $show_analytics;
249
if ( $showcomp eq 'both' || $showcomp eq 'staff' ) {
249
if ( $showcomp eq 'both' || $showcomp eq 'staff' ) {
250
    if ( my $components =
250
    my $components =
251
        !$invalid_marc_record ? $biblio->get_marc_components( C4::Context->preference('MaxComponentRecords') ) : undef )
251
        !$invalid_marc_record ? $biblio->get_marc_components( C4::Context->preference('MaxComponentRecords') ) : undef;
252
    {
252
    if ( @{$components} ) {
253
        $show_analytics = 1 if @{$components};    # just show link when having results
253
        $show_analytics = 1;    # just show link when having results
254
        $template->param( analytics_error => 1 )
254
        $template->param( analytics_error => 1 )
255
            if grep { $_->message eq 'component_search' } @{ $biblio->object_messages };
255
            if grep { $_->message eq 'component_search' } @{ $biblio->object_messages };
256
        my $parts;
256
        my $parts;
(-)a/opac/opac-detail.pl (-3 / +3 lines)
Lines 619-626 my $max_items_to_display = C4::Context->preference('OpacMaxItemsToDisplay') // 5 Link Here
619
my $showcomp = C4::Context->preference('ShowComponentRecords');
619
my $showcomp = C4::Context->preference('ShowComponentRecords');
620
my ( $parts, $show_analytics );
620
my ( $parts, $show_analytics );
621
if ( $showcomp eq 'both' || $showcomp eq 'opac' ) {
621
if ( $showcomp eq 'both' || $showcomp eq 'opac' ) {
622
    if ( my $components = $biblio->get_marc_components( C4::Context->preference('MaxComponentRecords') ) ) {
622
    my $components = $biblio->get_marc_components( C4::Context->preference('MaxComponentRecords') );
623
        $show_analytics = 1 if @{$components};    # just show link when having results
623
    if ( @{$components} ) {
624
        $show_analytics = 1;    # just show link when having results
624
        for my $part ( @{$components} ) {
625
        for my $part ( @{$components} ) {
625
            $part = C4::Search::new_record_from_zebra( 'biblioserver', $part );
626
            $part = C4::Search::new_record_from_zebra( 'biblioserver', $part );
626
            my $id = Koha::SearchEngine::Search::extract_biblionumber($part);
627
            my $id = Koha::SearchEngine::Search::extract_biblionumber($part);
627
- 

Return to bug 41713