Global tweaks wrt $wgSecureLogin.
authorPlatonides <platonides@gmail.com>
Mon, 26 Nov 2012 21:32:23 +0000 (22:32 +0100)
committerPlatonides <platonides@gmail.com>
Mon, 26 Nov 2012 21:32:23 +0000 (22:32 +0100)
· Remove duplicated global.
· Do not define a global in a switch.

Change-Id: I9b30d602ae86e0f0643d7788188efb3af367dec8

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

index 173d37a..ddd0780 100644 (file)
@@ -643,7 +643,6 @@ class SkinTemplate extends Skin {
                        $is_signup = $request->getText( 'type' ) == 'signup';
 
                        # anonlogin & login are the same
-                       global $wgSecureLogin;
                        $proto = $wgSecureLogin ? PROTO_HTTPS : null;
 
                        $login_id = $this->showIPinHeader() ? 'anonlogin' : 'login';
index dda159c..c9ac825 100644 (file)
@@ -752,11 +752,10 @@ class LoginForm extends SpecialPage {
        }
 
        function processLogin() {
-               global $wgMemc, $wgLang;
+               global $wgMemc, $wgLang, $wgSecureLogin;
 
                switch ( $this->authenticateUserData() ) {
                        case self::SUCCESS:
-                               global $wgSecureLogin;
                                # We've verified now, update the real record
                                $user = $this->getUser();
                                if( (bool)$this->mRemember != (bool)$user->getOption( 'rememberpassword' ) ) {