Lines 871-877
sub checkauth {
Link Here
|
871 |
elsif ( $sessionID = $query->cookie("CGISESSID") ) { # assignment, not comparison |
871 |
elsif ( $sessionID = $query->cookie("CGISESSID") ) { # assignment, not comparison |
872 |
my ( $return, $more_info ); |
872 |
my ( $return, $more_info ); |
873 |
( $return, $session, $more_info ) = check_cookie_auth( $sessionID, $flags, |
873 |
( $return, $session, $more_info ) = check_cookie_auth( $sessionID, $flags, |
874 |
{ remote_addr => $ENV{REMOTE_ADDR} } |
874 |
{ remote_addr => $ENV{REMOTE_ADDR}, skip_version_check => 1 } |
875 |
); |
875 |
); |
876 |
|
876 |
|
877 |
if ( $return eq 'ok' ) { |
877 |
if ( $return eq 'ok' ) { |
Lines 1648-1666
sub check_cookie_auth {
Link Here
|
1648 |
|
1648 |
|
1649 |
my $remote_addr = $params->{remote_addr} || $ENV{REMOTE_ADDR}; |
1649 |
my $remote_addr = $params->{remote_addr} || $ENV{REMOTE_ADDR}; |
1650 |
|
1650 |
|
1651 |
unless ( C4::Context->preference('Version') ) { |
1651 |
my $skip_version_check = $params->{skip_version_check}; # Only for checkauth |
1652 |
|
1652 |
|
1653 |
# database has not been installed yet |
1653 |
unless ( $skip_version_check ) { |
1654 |
return ( "maintenance", undef ); |
1654 |
unless ( C4::Context->preference('Version') ) { |
1655 |
} |
|
|
1656 |
my $kohaversion = Koha::version(); |
1657 |
$kohaversion =~ s/(.*\..*)\.(.*)\.(.*)/$1$2$3/; |
1658 |
if ( C4::Context->preference('Version') < $kohaversion ) { |
1659 |
|
1655 |
|
1660 |
# database in need of version update; assume that |
1656 |
# database has not been installed yet |
1661 |
# no API should be called while databsae is in |
1657 |
return ( "maintenance", undef ); |
1662 |
# this condition. |
1658 |
} |
1663 |
return ( "maintenance", undef ); |
1659 |
my $kohaversion = Koha::version(); |
|
|
1660 |
$kohaversion =~ s/(.*\..*)\.(.*)\.(.*)/$1$2$3/; |
1661 |
if ( C4::Context->preference('Version') < $kohaversion ) { |
1662 |
|
1663 |
# database in need of version update; assume that |
1664 |
# no API should be called while databsae is in |
1665 |
# this condition. |
1666 |
return ( "maintenance", undef ); |
1667 |
} |
1664 |
} |
1668 |
} |
1665 |
|
1669 |
|
1666 |
# see if we have a valid session cookie already |
1670 |
# see if we have a valid session cookie already |
1667 |
- |
|
|