Merge "Move section ID fallbacks into headers themselves"
[lhc/web/wiklou.git] / includes / specials / helpers / LoginHelper.php
index f853f41..a35a420 100644 (file)
@@ -75,7 +75,7 @@ class LoginHelper extends ContextSource {
                // Allow modification of redirect behavior
                Hooks::run( 'PostLoginRedirect', [ &$returnTo, &$returnToQuery, &$type ] );
 
-               $returnToTitle = Title::newFromText( $returnTo ) ?:  Title::newMainPage();
+               $returnToTitle = Title::newFromText( $returnTo ) ?: Title::newMainPage();
 
                if ( $wgSecureLogin && !$stickHTTPS ) {
                        $options = [ 'http' ];
@@ -89,7 +89,7 @@ class LoginHelper extends ContextSource {
                }
 
                if ( $type === 'successredirect' ) {
-                       $redirectUrl = $returnToTitle->getFullURL( $returnToQuery, false, $proto );
+                       $redirectUrl = $returnToTitle->getFullUrlForRedirect( $returnToQuery, $proto );
                        $this->getOutput()->redirect( $redirectUrl );
                } else {
                        $this->getOutput()->addReturnTo( $returnToTitle, $returnToQuery, null, $options );