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

(-)a/Koha/SearchEngine/Elasticsearch/QueryBuilder.pm (+1 lines)
Lines 986-991 sub clean_search_term { Link Here
986
    $term =~ s/((?<!\\)(?:[\\]{2})*:[^:\s]+(?<!\\)(?:[\\]{2})*)(?=:)/$1\\/g;
986
    $term =~ s/((?<!\\)(?:[\\]{2})*:[^:\s]+(?<!\\)(?:[\\]{2})*)(?=:)/$1\\/g;
987
987
988
    # screen all exclamation signs that either are the last symbol or have white space after them
988
    # screen all exclamation signs that either are the last symbol or have white space after them
989
    # or are followed by close parentheses
989
    $term =~ s/(?:[\s\\]*!\s*)+(\s|$|\))/$1/g;
990
    $term =~ s/(?:[\s\\]*!\s*)+(\s|$|\))/$1/g;
990
991
991
    # screen all brackets with backslash
992
    # screen all brackets with backslash
(-)a/catalogue/detail.pl (-2 / +5 lines)
Lines 147-158 my $marcflavour = C4::Context->preference("marcflavour"); Link Here
147
147
148
    };
148
    };
149
    if ($err || $@){
149
    if ($err || $@){
150
        warn "Warning from simple_search_compat: $err.$@";
150
        my $error = q{};
151
        $error .= $err if $err;
152
        $error .= $@ if $@;
153
        warn "Warning from simple_search_compat: $error";
151
        $template->param( analytics_error => 1 );
154
        $template->param( analytics_error => 1 );
152
    }
155
    }
153
156
154
    my $variables = {
157
    my $variables = {
155
        show_analytics_link => $count > 0 ? 1 : 0
158
        show_analytics_link => defined $count && $count > 0 ? 1 : 0
156
    };
159
    };
157
160
158
    $template->param(
161
    $template->param(
(-)a/opac/opac-detail.pl (-3 / +5 lines)
Lines 217-228 my $ean = GetNormalizedEAN( $record, $marcflavour ); Link Here
217
217
218
    };
218
    };
219
    if ($err || $@){
219
    if ($err || $@){
220
        warn "Warning from simple_search_compat: $err.$@";
220
        my $error = q{};
221
        $error .= $err if $err;
222
        $error .= $@ if $@;
223
        warn "Warning from simple_search_compat: $error";
221
    }
224
    }
222
225
223
    my $variables = {
226
    my $variables = {
224
        anonymous_session   => ($borrowernumber) ? 0 : 1,
227
        anonymous_session   => ($borrowernumber) ? 0 : 1,
225
        show_analytics_link => $count > 0 ? 1 : 0
228
        show_analytics_link => defined $count && $count > 0 ? 1 : 0
226
    };
229
    };
227
230
228
    my $lang   = C4::Languages::getlanguage();
231
    my $lang   = C4::Languages::getlanguage();
229
- 

Return to bug 29284