|
Lines 20-25
Link Here
|
| 20 |
use Modern::Perl; |
20 |
use Modern::Perl; |
| 21 |
|
21 |
|
| 22 |
use CGI qw ( -utf8 ); |
22 |
use CGI qw ( -utf8 ); |
|
|
23 |
use URI; |
| 23 |
|
24 |
|
| 24 |
use C4::Auth qw( get_template_and_user ); |
25 |
use C4::Auth qw( get_template_and_user ); |
| 25 |
use C4::Koha qw( |
26 |
use C4::Koha qw( |
|
Lines 428-439
if ($search_query) {
Link Here
|
| 428 |
# back to the page we triggered the login from |
429 |
# back to the page we triggered the login from |
| 429 |
my $return = $query->param('return'); |
430 |
my $return = $query->param('return'); |
| 430 |
if ( $return ) { |
431 |
if ( $return ) { |
| 431 |
my $uri = C4::Context->preference('OPACBaseURL'); |
432 |
my $uri_syspref = C4::Context->preference('OPACBaseURL'); |
| 432 |
$uri .= $return; |
433 |
if ( $uri_syspref ){ |
| 433 |
print $query->redirect( |
434 |
my $uri = URI->new($uri_syspref); |
| 434 |
-uri => $uri, |
435 |
if ( $uri->isa('URI::http') && $uri->host() ){ |
| 435 |
-cookie => $cookie, |
436 |
my $return_uri = URI->new($return); |
| 436 |
); |
437 |
$return_uri->scheme( $uri->scheme() ); |
|
|
438 |
$return_uri->authority( $uri->authority() ); |
| 439 |
print $query->redirect( |
| 440 |
-uri => "$return_uri", |
| 441 |
-cookie => $cookie, |
| 442 |
); |
| 443 |
} |
| 444 |
} |
| 437 |
} |
445 |
} |
| 438 |
|
446 |
|
| 439 |
output_html_with_http_headers $query, $cookie, $template->output, undef, { force_no_caching => 1 }; |
447 |
output_html_with_http_headers $query, $cookie, $template->output, undef, { force_no_caching => 1 }; |
| 440 |
- |
|
|