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

(-)a/C4/Search.pm (-1 / +1 lines)
Lines 532-538 sub getRecords { Link Here
532
                                foreach my $field (@fields) {
532
                                foreach my $field (@fields) {
533
                                    my $data = $field->as_string( $subfield_letters, $facet->{sep} );
533
                                    my $data = $field->as_string( $subfield_letters, $facet->{sep} );
534
534
535
                                    unless ( $data ~~ @used_datas ) {
535
                                    unless ( grep { /^$data$/ } @used_datas ) {
536
                                        push @used_datas, $data;
536
                                        push @used_datas, $data;
537
                                        $facets_counter->{ $facet->{idx} }->{$data}++;
537
                                        $facets_counter->{ $facet->{idx} }->{$data}++;
538
                                    }
538
                                    }
(-)a/opac/opac-search.pl (-10 / +6 lines)
Lines 30-44 use Modern::Perl; Link Here
30
use C4::Context;
30
use C4::Context;
31
31
32
my $searchengine = C4::Context->preference("SearchEngine");
32
my $searchengine = C4::Context->preference("SearchEngine");
33
for ( $searchengine ) {
33
if ( $searchengine =~ /^Solr$/ ) {
34
    when ( /^Solr$/ ) {
34
    warn "We use Solr";
35
        warn "We use Solr";
35
    require 'opac/search.pl';
36
        require 'opac/search.pl';
36
    exit;
37
        exit;
37
} elsif ( $searchengine =~ /^Zebra$/ ) {
38
    }
39
    when ( /^Zebra$/ ) {
40
38
41
    }
42
}
39
}
43
40
44
use C4::Output;
41
use C4::Output;
Lines 360-366 my @allowed_sortby = qw /acqdate_asc acqdate_dsc author_az author_za call_number Link Here
360
@sort_by = $cgi->param('sort_by');
357
@sort_by = $cgi->param('sort_by');
361
$sort_by[0] = $default_sort_by if !$sort_by[0] && defined($default_sort_by);
358
$sort_by[0] = $default_sort_by if !$sort_by[0] && defined($default_sort_by);
362
foreach my $sort (@sort_by) {
359
foreach my $sort (@sort_by) {
363
    if ( $sort ~~ @allowed_sortby ) {
360
    if ( grep { /^$sort$/ } @allowed_sortby ) {
364
        $template->param($sort => 1);
361
        $template->param($sort => 1);
365
    }
362
    }
366
}
363
}
367
- 

Return to bug 12151