Lines 26-32
use JSON qw/encode_json/;
Link Here
|
26 |
use URI::Escape; |
26 |
use URI::Escape; |
27 |
use CGI::Session; |
27 |
use CGI::Session; |
28 |
|
28 |
|
29 |
require Exporter; |
|
|
30 |
use C4::Context; |
29 |
use C4::Context; |
31 |
use C4::Templates; # to get the template |
30 |
use C4::Templates; # to get the template |
32 |
use C4::Languages; |
31 |
use C4::Languages; |
Lines 50-57
use Net::CIDR;
Link Here
|
50 |
use C4::Log qw/logaction/; |
49 |
use C4::Log qw/logaction/; |
51 |
|
50 |
|
52 |
# use utf8; |
51 |
# use utf8; |
53 |
use vars qw(@ISA @EXPORT @EXPORT_OK %EXPORT_TAGS $debug $ldap $cas $caslogout); |
52 |
use vars qw($debug $ldap $cas $caslogout); |
54 |
|
53 |
our (@ISA, @EXPORT_OK); |
55 |
BEGIN { |
54 |
BEGIN { |
56 |
sub psgi_env { any { /^psgi\./ } keys %ENV } |
55 |
sub psgi_env { any { /^psgi\./ } keys %ENV } |
57 |
|
56 |
|
Lines 63-74
BEGIN {
Link Here
|
63 |
C4::Context->set_remote_address; |
62 |
C4::Context->set_remote_address; |
64 |
|
63 |
|
65 |
$debug = $ENV{DEBUG}; |
64 |
$debug = $ENV{DEBUG}; |
66 |
@ISA = qw(Exporter); |
65 |
require Exporter; |
67 |
@EXPORT = qw(&checkauth &get_template_and_user &haspermission &get_user_subpermissions); |
66 |
@ISA = qw(Exporter); |
|
|
67 |
|
68 |
@EXPORT_OK = qw(&check_api_auth &get_session &check_cookie_auth &checkpw &checkpw_internal &checkpw_hash |
68 |
@EXPORT_OK = qw(&check_api_auth &get_session &check_cookie_auth &checkpw &checkpw_internal &checkpw_hash |
69 |
&get_all_subpermissions &get_user_subpermissions track_login_daily &in_iprange |
69 |
&get_all_subpermissions &get_user_subpermissions track_login_daily &in_iprange |
|
|
70 |
&get_template_and_user |
70 |
); |
71 |
); |
71 |
%EXPORT_TAGS = ( EditPermissions => [qw(get_all_subpermissions get_user_subpermissions)] ); |
72 |
|
|
|
73 |
$debug = $ENV{DEBUG}; |
72 |
$ldap = C4::Context->config('useldapserver') || 0; |
74 |
$ldap = C4::Context->config('useldapserver') || 0; |
73 |
$cas = C4::Context->preference('casAuthentication'); |
75 |
$cas = C4::Context->preference('casAuthentication'); |
74 |
$caslogout = C4::Context->preference('casLogout'); |
76 |
$caslogout = C4::Context->preference('casLogout'); |