(bug 40789) Fixed $wgSecureLogin after-login redirect.
authorTyler Anthony Romeo <tylerromeo@gmail.com>
Sun, 7 Oct 2012 14:17:31 +0000 (10:17 -0400)
committerTyler Anthony Romeo <tylerromeo@gmail.com>
Sun, 7 Oct 2012 14:17:31 +0000 (10:17 -0400)
Check for $wgSecureLogin accidentally redirected users
to HTTPS when $wgSecureLogin was off. This fixes the
conditional statement so that when secure login is off
original functionality is preserved.

Change-Id: Ida8a2de849e2ad208129b272936ebc5806a16d71

includes/specials/SpecialUserlogin.php

index b7d01c8..ca14096 100644 (file)
@@ -988,9 +988,12 @@ class LoginForm extends SpecialPage {
                if ( $wgSecureLogin && !$this->mStickHTTPS ) {
                        $options = array( 'http' );
                        $proto = PROTO_HTTP;
-               } else {
+               } elseif( $wgSecureLogin ) {
                        $options = array( 'https' );
                        $proto = PROTO_HTTPS;
+               } else {
+                       $options = array();
+                       $proto = PROTO_RELATIVE;
                }
 
                if ( $type == 'successredirect' ) {