|
Lines 192-198
sub get_template_and_user {
Link Here
|
| 192 |
-HttpOnly => 1, |
192 |
-HttpOnly => 1, |
| 193 |
); |
193 |
); |
| 194 |
|
194 |
|
| 195 |
$template->param( loginprompt => 1 ); |
195 |
$template->param( |
|
|
196 |
loginprompt => 1, |
| 197 |
script_name => _get_script_name(), |
| 198 |
); |
| 196 |
print $in->{query}->header( |
199 |
print $in->{query}->header( |
| 197 |
{ type => 'text/html', |
200 |
{ type => 'text/html', |
| 198 |
charset => 'utf-8', |
201 |
charset => 'utf-8', |
|
Lines 1208-1213
sub checkauth {
Link Here
|
| 1208 |
opaclayoutstylesheet => C4::Context->preference("opaclayoutstylesheet"), |
1211 |
opaclayoutstylesheet => C4::Context->preference("opaclayoutstylesheet"), |
| 1209 |
login => 1, |
1212 |
login => 1, |
| 1210 |
INPUTS => \@inputs, |
1213 |
INPUTS => \@inputs, |
|
|
1214 |
script_name => _get_script_name(), |
| 1211 |
casAuthentication => C4::Context->preference("casAuthentication"), |
1215 |
casAuthentication => C4::Context->preference("casAuthentication"), |
| 1212 |
shibbolethAuthentication => $shib, |
1216 |
shibbolethAuthentication => $shib, |
| 1213 |
SessionRestrictionByIP => C4::Context->preference("SessionRestrictionByIP"), |
1217 |
SessionRestrictionByIP => C4::Context->preference("SessionRestrictionByIP"), |
|
Lines 2041-2046
sub getborrowernumber {
Link Here
|
| 2041 |
return 0; |
2045 |
return 0; |
| 2042 |
} |
2046 |
} |
| 2043 |
|
2047 |
|
|
|
2048 |
=head2 _get_script_name |
| 2049 |
|
| 2050 |
This returns the correct script name, for use in redirecting back to the correct page after showing |
| 2051 |
the login screen. It depends on details of the package Plack configuration, and should not be used |
| 2052 |
outside this context. |
| 2053 |
|
| 2054 |
=cut |
| 2055 |
|
| 2056 |
sub _get_script_name { |
| 2057 |
# This is the method about.pl uses to detect Plack; now that two places use it, it MUST be |
| 2058 |
# right. |
| 2059 |
if ( ( any { /(^psgi\.|^plack\.)/i } keys %ENV ) && $ENV{SCRIPT_NAME} =~ m,^/(intranet|opac)(.*), ) { |
| 2060 |
return '/cgi-bin/koha' . $2; |
| 2061 |
} else { |
| 2062 |
return $ENV{SCRIPT_NAME}; |
| 2063 |
} |
| 2064 |
} |
| 2065 |
|
| 2044 |
END { } # module clean-up code here (global destructor) |
2066 |
END { } # module clean-up code here (global destructor) |
| 2045 |
1; |
2067 |
1; |
| 2046 |
__END__ |
2068 |
__END__ |