From: Tyler Anthony Romeo Date: Mon, 1 Oct 2012 01:23:05 +0000 (-0400) Subject: (bug 40541) Fixed minor code style problems. X-Git-Tag: 1.31.0-rc.0~22217 X-Git-Url: http://git.cyclocoop.org/%24image?a=commitdiff_plain;h=af68ecea64a83243de1cc19a8406bc6b7e868fdd;p=lhc%2Fweb%2Fwiklou.git (bug 40541) Fixed minor code style problems. Follow-up to I17ac68014840daa47bfd4768e978e9ff2edb00db. Replaces some ==/!= with ===/!== and other code style changes mentioned in Gerrit comments on previous patchset. Change-Id: I50da16bc62241491ac5c4948e0d3059b21f113dc --- diff --git a/includes/SkinTemplate.php b/includes/SkinTemplate.php index 54cc5a930c..b4da525f02 100644 --- a/includes/SkinTemplate.php +++ b/includes/SkinTemplate.php @@ -554,7 +554,7 @@ class SkinTemplate extends Skin { } } - if ( $wgSecureLogin && $request->detectProtocol() == 'https' ) { + if ( $wgSecureLogin && $request->detectProtocol() === 'https' ) { $a['wpStickHTTPS'] = true; } diff --git a/includes/Title.php b/includes/Title.php index 1e16c7522a..838d9321c7 100644 --- a/includes/Title.php +++ b/includes/Title.php @@ -1402,7 +1402,7 @@ class Title { */ public function getLinkURL( $query = '', $query2 = false, $proto = PROTO_RELATIVE ) { wfProfileIn( __METHOD__ ); - if ( $this->isExternal() || $proto != PROTO_RELATIVE ) { + if ( $this->isExternal() || $proto !== PROTO_RELATIVE ) { $ret = $this->getFullURL( $query, $query2, $proto ); } elseif ( $this->getPrefixedText() === '' && $this->getFragment() !== '' ) { $ret = $this->getFragmentForURL(); diff --git a/includes/specials/SpecialUserlogin.php b/includes/specials/SpecialUserlogin.php index 039f5695b0..7e66797e3d 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 {