Follow-up to I17ac68014840daa47bfd4768e978e9ff2edb00db.
Replaces some ==/!= with ===/!== and other code style
changes mentioned in Gerrit comments on previous patchset.
Change-Id: I50da16bc62241491ac5c4948e0d3059b21f113dc
}
}
- if ( $wgSecureLogin && $request->detectProtocol() == 'https' ) {
+ if ( $wgSecureLogin && $request->detectProtocol() === 'https' ) {
$a['wpStickHTTPS'] = true;
}
*/
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();
global $wgSecureLogin;
if (
- $this->mType != 'signup' &&
+ $this->mType !== 'signup' &&
$wgSecureLogin &&
WebRequest::detectProtocol() !== 'https'
) {
} 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
$returnToTitle = Title::newMainPage();
}
- if( $wgSecureLogin && !$this->mStickHTTPS ) {
+ if ( $wgSecureLogin && !$this->mStickHTTPS ) {
$options = array( 'http' );
$proto = PROTO_HTTP;
} else {