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

(-)a/C4/Search.pm (-3 / +5 lines)
Lines 313-319 sub SimpleSearch { Link Here
313
313
314
        $koha_query,       $simple_query, $sort_by_ref,    $servers_ref,
314
        $koha_query,       $simple_query, $sort_by_ref,    $servers_ref,
315
        $results_per_page, $offset,       $branches,       $itemtypes,
315
        $results_per_page, $offset,       $branches,       $itemtypes,
316
        $query_type,       $scan,         $opac
316
        $query_type,       $scan
317
    );
317
    );
318
318
319
The all singing, all dancing, multi-server, asynchronous, scanning,
319
The all singing, all dancing, multi-server, asynchronous, scanning,
Lines 327-333 sub getRecords { Link Here
327
    my (
327
    my (
328
        $koha_query,       $simple_query, $sort_by_ref,    $servers_ref,
328
        $koha_query,       $simple_query, $sort_by_ref,    $servers_ref,
329
        $results_per_page, $offset,       $branches,         $itemtypes,
329
        $results_per_page, $offset,       $branches,         $itemtypes,
330
        $query_type,       $scan,         $opac
330
        $query_type,       $scan
331
    ) = @_;
331
    ) = @_;
332
332
333
    my @servers = @$servers_ref;
333
    my @servers = @$servers_ref;
Lines 343-348 sub getRecords { Link Here
343
    # TODO simplify this structure ( { branchcode => $branchname } is enought) and remove this parameter
343
    # TODO simplify this structure ( { branchcode => $branchname } is enought) and remove this parameter
344
    $branches ||= { map { $_->branchcode => { branchname => $_->branchname } } Koha::Libraries->search };
344
    $branches ||= { map { $_->branchcode => { branchname => $_->branchname } } Koha::Libraries->search };
345
345
346
    my $interface = C4::Context->interface;
347
346
    # Initialize variables for the faceted results objects
348
    # Initialize variables for the faceted results objects
347
    my $facets_counter = {};
349
    my $facets_counter = {};
348
    my $facets_info    = {};
350
    my $facets_info    = {};
Lines 584-590 sub getRecords { Link Here
584
                                $av = Koha::AuthorisedValues->search({ category => 'CCODE', authorised_value => $one_facet });
586
                                $av = Koha::AuthorisedValues->search({ category => 'CCODE', authorised_value => $one_facet });
585
                            }
587
                            }
586
588
587
                            if ($opac) {
589
                            if ($interface eq 'opac') {
588
                                $facet_label_value = $av->next->opac_description if $av && $av->count;
590
                                $facet_label_value = $av->next->opac_description if $av && $av->count;
589
                            } else {
591
                            } else {
590
                                $av = $av->next if $av && $av->count;
592
                                $av = $av->next if $av && $av->count;
(-)a/catalogue/search.pl (-1 / +1 lines)
Lines 539-545 eval { Link Here
539
    ( $error, $results_hashref, $facets ) = $searcher->search_compat(
539
    ( $error, $results_hashref, $facets ) = $searcher->search_compat(
540
        $query,            $simple_query, \@sort_by,       \@servers,
540
        $query,            $simple_query, \@sort_by,       \@servers,
541
        $results_per_page, $offset,       undef,           $itemtypes,
541
        $results_per_page, $offset,       undef,           $itemtypes,
542
        $query_type,       $scan,         0
542
        $query_type,       $scan
543
    );
543
    );
544
};
544
};
545
545
(-)a/opac/opac-search.pl (-2 / +1 lines)
Lines 633-639 if ($tag) { Link Here
633
    $pasarParams .= '&query_type=' . uri_escape_utf8($query_type) if ($query_type);
633
    $pasarParams .= '&query_type=' . uri_escape_utf8($query_type) if ($query_type);
634
    my $itemtypes_nocategory = { map { $_->{itemtype} => $_ } @{ Koha::ItemTypes->search_with_localization->unblessed } };
634
    my $itemtypes_nocategory = { map { $_->{itemtype} => $_ } @{ Koha::ItemTypes->search_with_localization->unblessed } };
635
    eval {
635
    eval {
636
        ($error, $results_hashref, $facets) = $searcher->search_compat($query,$simple_query,\@sort_by,\@servers,$results_per_page,$offset,undef,$itemtypes_nocategory,$query_type,$scan,1);
636
        ($error, $results_hashref, $facets) = $searcher->search_compat($query,$simple_query,\@sort_by,\@servers,$results_per_page,$offset,undef,$itemtypes_nocategory,$query_type,$scan);
637
};
637
};
638
}
638
}
639
639
640
- 

Return to bug 23912