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

(-)a/Koha/Biblio.pm (-1 / +1 lines)
Lines 598-604 sub get_components_query { Link Here
598
        my $cleaned_title = $marc->subfield('245', "a");
598
        my $cleaned_title = $marc->subfield('245', "a");
599
        $cleaned_title =~ tr|/||;
599
        $cleaned_title =~ tr|/||;
600
        $cleaned_title = $builder->clean_search_term($cleaned_title);
600
        $cleaned_title = $builder->clean_search_term($cleaned_title);
601
        $searchstr = "Host-item:($cleaned_title)";
601
        $searchstr = qq#Host-item:("$cleaned_title")#;
602
    }
602
    }
603
    my ($error, $query_str) = $builder->build_query_compat( undef, [$searchstr], undef, undef, [$sort], 0 );
603
    my ($error, $query_str) = $builder->build_query_compat( undef, [$searchstr], undef, undef, [$sort], 0 );
604
    if( $error ){
604
    if( $error ){
(-)a/t/db_dependent/Koha/Biblio.t (-2 / +1 lines)
Lines 572-578 subtest 'get_components_query' => sub { Link Here
572
    t::lib::Mocks::mock_preference( 'ComponentSortField', 'author' );
572
    t::lib::Mocks::mock_preference( 'ComponentSortField', 'author' );
573
    t::lib::Mocks::mock_preference( 'ComponentSortOrder', 'za' );
573
    t::lib::Mocks::mock_preference( 'ComponentSortOrder', 'za' );
574
    my ( $comp_q, $comp_s ) = $biblio->get_components_query;
574
    my ( $comp_q, $comp_s ) = $biblio->get_components_query;
575
    is($comp_q, "Host-item:(Some boring read)",, "UseControlNumber disabled");
575
    is($comp_q, 'Host-item:("Some boring read")', "UseControlNumber disabled");
576
    is($comp_s, "author_za", "UseControlNumber disabled sort is correct");
576
    is($comp_s, "author_za", "UseControlNumber disabled sort is correct");
577
577
578
    t::lib::Mocks::mock_preference( 'UseControlNumber', '1' );
578
    t::lib::Mocks::mock_preference( 'UseControlNumber', '1' );
579
- 

Return to bug 30865