X-Git-Url: http://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fspecials%2FSpecialUserlogin.php;h=b7d01c8114bf9d97cd6ef5b1c38dedd76b2c9f2b;hb=fcdf2518605954fe1bcf88598fc14bd95d525882;hp=039f5695b0bd8c2d839c186ab0a38601353b27c3;hpb=c5f732bcbe31580e5fe7f0c05ec151a8542dd5c6;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/specials/SpecialUserlogin.php b/includes/specials/SpecialUserlogin.php index 039f5695b0..b7d01c8114 100644 --- a/includes/specials/SpecialUserlogin.php +++ b/includes/specials/SpecialUserlogin.php @@ -151,7 +151,7 @@ class LoginForm extends SpecialPage { global $wgSecureLogin; if ( - $this->mType != 'signup' && + $this->mType !== 'signup' && $wgSecureLogin && WebRequest::detectProtocol() !== 'https' ) { @@ -747,7 +747,12 @@ class LoginForm extends SpecialPage { } else { $user->invalidateCache(); } - $user->setCookies( null, $wgSecureLogin && !$this->mStickHTTPS ? false : null ); + + if( $wgSecureLogin && !$this->mStickHTTPS ) { + $user->setCookies( null, false ); + } else { + $user->setCookies(); + } self::clearLoginToken(); // Reset the throttle @@ -980,7 +985,7 @@ class LoginForm extends SpecialPage { $returnToTitle = Title::newMainPage(); } - if( $wgSecureLogin && !$this->mStickHTTPS ) { + if ( $wgSecureLogin && !$this->mStickHTTPS ) { $options = array( 'http' ); $proto = PROTO_HTTP; } else { @@ -992,7 +997,7 @@ class LoginForm extends SpecialPage { $redirectUrl = $returnToTitle->getFullURL( $returnToQuery, false, $proto ); $this->getOutput()->redirect( $redirectUrl ); } else { - $this->getOutput()->addReturnTo( $returnToTitle, $returnToQuery, $options ); + $this->getOutput()->addReturnTo( $returnToTitle, $returnToQuery, null, $options ); } }