Web installer should not pollute global namespace with session variables
authorsaper <saper@saper.info>
Fri, 23 Oct 2015 20:54:42 +0000 (22:54 +0200)
committersaper <saper@saper.info>
Sat, 24 Oct 2015 00:00:02 +0000 (02:00 +0200)
There is no need to store session variables
(that also include user-supplied arguments)
as $wgXXX global variables.

Bug: T116375
Change-Id: I880d4299566beaf99ed1fc21c690cdda64149b0e

includes/installer/Installer.php
includes/installer/WebInstaller.php

index 064bd6d..91589e1 100644 (file)
@@ -691,17 +691,6 @@ abstract class Installer {
                return Status::newGood();
        }
 
-       /**
-        * Exports all wg* variables stored by the installer into global scope.
-        */
-       public function exportVars() {
-               foreach ( $this->settings as $name => $value ) {
-                       if ( substr( $name, 0, 2 ) == 'wg' ) {
-                               $GLOBALS[$name] = $value;
-                       }
-               }
-       }
-
        /**
         * Environment check for DB types.
         * @return bool
index 67a4def..9edc25a 100644 (file)
@@ -159,7 +159,6 @@ class WebInstaller extends Installer {
                        $this->settings = $session['settings'] + $this->settings;
                }
 
-               $this->exportVars();
                $this->setupLanguage();
 
                if ( ( $this->getVar( '_InstallDone' ) || $this->getVar( '_UpgradeDone' ) )