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

(-)a/C4/Output.pm (-2 / +12 lines)
Lines 271-276 sub output_with_http_headers { Link Here
271
    };
271
    };
272
    $options->{expires} = 'now' if $extra_options->{force_no_caching};
272
    $options->{expires} = 'now' if $extra_options->{force_no_caching};
273
273
274
    my $redirect_url = $extra_options->{redirect_url};
275
274
    $options->{cookie} = $cookie if $cookie;
276
    $options->{cookie} = $cookie if $cookie;
275
    if ($content_type eq 'html') {  # guaranteed to be one of the content_type_map keys, else we'd have died
277
    if ($content_type eq 'html') {  # guaranteed to be one of the content_type_map keys, else we'd have died
276
        $options->{'Content-Style-Type' } = 'text/css';
278
        $options->{'Content-Style-Type' } = 'text/css';
Lines 281-287 sub output_with_http_headers { Link Here
281
# We need to fix the encoding as it comes out of the database, or when we pass the variables to templates
283
# We need to fix the encoding as it comes out of the database, or when we pass the variables to templates
282
284
283
    $data =~ s/\&amp\;amp\; /\&amp\; /g;
285
    $data =~ s/\&amp\;amp\; /\&amp\; /g;
284
    print $query->header($options), $data;
286
287
    if ( $redirect_url =~ /opac-search/ ) {
288
        print $query->redirect(
289
            -URL => $redirect_url,
290
            -COOKIE => $cookie,
291
        );
292
    }
293
    else {
294
        print $query->header($options), $data;
295
    }
285
}
296
}
286
297
287
sub output_html_with_http_headers {
298
sub output_html_with_http_headers {
Lines 289-295 sub output_html_with_http_headers { Link Here
289
    output_with_http_headers( $query, $cookie, $data, 'html', $status, $extra_options );
300
    output_with_http_headers( $query, $cookie, $data, 'html', $status, $extra_options );
290
}
301
}
291
302
292
293
sub output_ajax_with_http_headers {
303
sub output_ajax_with_http_headers {
294
    my ( $query, $js ) = @_;
304
    my ( $query, $js ) = @_;
295
    print $query->header(
305
    print $query->header(
(-)a/opac/opac-search.pl (+2 lines)
Lines 985-990 if (C4::Context->preference('GoogleIndicTransliteration')) { Link Here
985
        $template->param('GoogleIndicTransliteration' => 1);
985
        $template->param('GoogleIndicTransliteration' => 1);
986
}
986
}
987
987
988
$template->param( full_url => $cgi->url() );
989
988
$template->{VARS}->{DidYouMean} =
990
$template->{VARS}->{DidYouMean} =
989
  ( defined C4::Context->preference('OPACdidyoumean')
991
  ( defined C4::Context->preference('OPACdidyoumean')
990
      && C4::Context->preference('OPACdidyoumean') =~ m/enable/ );
992
      && C4::Context->preference('OPACdidyoumean') =~ m/enable/ );
(-)a/opac/opac-user.pl (-2 / +8 lines)
Lines 80-85 my $canrenew = 1; Link Here
80
80
81
$template->param( shibbolethAuthentication => C4::Context->config('useshibboleth') );
81
$template->param( shibbolethAuthentication => C4::Context->config('useshibboleth') );
82
82
83
my $full_url = $ENV{HTTP_REFERER};
84
83
if (!$borrowernumber) {
85
if (!$borrowernumber) {
84
    $template->param( adminWarning => 1 );
86
    $template->param( adminWarning => 1 );
85
}
87
}
Lines 338-341 $template->param( Link Here
338
    failed_holds             => scalar $query->param('failed_holds'),
340
    failed_holds             => scalar $query->param('failed_holds'),
339
);
341
);
340
342
341
output_html_with_http_headers $query, $cookie, $template->output, undef, { force_no_caching => 1 };
343
if ( $full_url =~ /opac-search/ ) {
344
    output_html_with_http_headers $query, $cookie, $template->output, undef, { force_no_caching => 1, redirect_url => $full_url };
345
}
346
else {
347
    output_html_with_http_headers $query, $cookie, $template->output, undef, { force_no_caching => 1 };
348
}
342
- 

Return to bug 17153