Merge "(bug 40789) Fixed $wgSecureLogin after-login redirect."
authorCSteipp <csteipp@wikimedia.org>
Tue, 9 Oct 2012 17:37:25 +0000 (17:37 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Tue, 9 Oct 2012 17:37:25 +0000 (17:37 +0000)
1  2 
includes/specials/SpecialUserlogin.php

@@@ -286,7 -286,6 +286,7 @@@ class LoginForm extends SpecialPage 
  
        /**
         * @private
 +       * @throws PermissionsError|ReadOnlyError
         * @return bool|User
         */
        function addNewAccountInternal() {
                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' ) {