(bug 40541) Fixed minor code style problems.
authorTyler Anthony Romeo <tylerromeo@gmail.com>
Mon, 1 Oct 2012 01:23:05 +0000 (21:23 -0400)
committerTyler Anthony Romeo <tylerromeo@gmail.com>
Mon, 1 Oct 2012 01:23:05 +0000 (21:23 -0400)
Follow-up to I17ac68014840daa47bfd4768e978e9ff2edb00db.
Replaces some ==/!= with ===/!== and other code style
changes mentioned in Gerrit comments on previous patchset.

Change-Id: I50da16bc62241491ac5c4948e0d3059b21f113dc

includes/SkinTemplate.php
includes/Title.php
includes/specials/SpecialUserlogin.php

index 54cc5a9..b4da525 100644 (file)
@@ -554,7 +554,7 @@ class SkinTemplate extends Skin {
                        }
                }
 
-               if ( $wgSecureLogin && $request->detectProtocol() == 'https' ) {
+               if ( $wgSecureLogin && $request->detectProtocol() === 'https' ) {
                        $a['wpStickHTTPS'] = true;
                }
 
index 1e16c75..838d932 100644 (file)
@@ -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();
index 039f569..7e66797 100644 (file)
@@ -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 {