Lines 21-27
use Modern::Perl;
Link Here
|
21 |
use Crypt::Eksblowfish::Bcrypt qw(bcrypt en_base64); |
21 |
use Crypt::Eksblowfish::Bcrypt qw(bcrypt en_base64); |
22 |
use Encode qw( encode is_utf8 ); |
22 |
use Encode qw( encode is_utf8 ); |
23 |
use Fcntl qw/O_RDONLY/; # O_RDONLY is used in generate_salt |
23 |
use Fcntl qw/O_RDONLY/; # O_RDONLY is used in generate_salt |
24 |
use List::MoreUtils qw/ any /; |
|
|
25 |
use String::Random qw( random_string ); |
24 |
use String::Random qw( random_string ); |
26 |
|
25 |
|
27 |
use C4::Context; |
26 |
use C4::Context; |
Lines 193-199
outside this context.
Link Here
|
193 |
sub get_script_name { |
192 |
sub get_script_name { |
194 |
# This is the method about.pl uses to detect Plack; now that two places use it, it MUST be |
193 |
# This is the method about.pl uses to detect Plack; now that two places use it, it MUST be |
195 |
# right. |
194 |
# right. |
196 |
if ( ( any { /(^psgi\.|^plack\.)/i } keys %ENV ) && $ENV{SCRIPT_NAME} =~ m,^/(intranet|opac)(.*), ) { |
195 |
if ( C4::Context->is_psgi && $ENV{SCRIPT_NAME} =~ m,^/(intranet|opac)(.*), ) { |
197 |
return '/cgi-bin/koha' . $2; |
196 |
return '/cgi-bin/koha' . $2; |
198 |
} else { |
197 |
} else { |
199 |
return $ENV{SCRIPT_NAME}; |
198 |
return $ENV{SCRIPT_NAME}; |