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

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

Return to bug 28785