View | Details | Raw Unified | Return to bug 28785
Collapse All | Expand All

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

Return to bug 28785