From: saper Date: Fri, 23 Oct 2015 20:54:42 +0000 (+0200) Subject: Web installer should not pollute global namespace with session variables X-Git-Tag: 1.31.0-rc.0~9272^2 X-Git-Url: http://git.cyclocoop.org/ecrire?a=commitdiff_plain;h=a93aa28711e2ba996dbd501b28afede5afada5ef;p=lhc%2Fweb%2Fwiklou.git Web installer should not pollute global namespace with session variables There is no need to store session variables (that also include user-supplied arguments) as $wgXXX global variables. Bug: T116375 Change-Id: I880d4299566beaf99ed1fc21c690cdda64149b0e --- diff --git a/includes/installer/Installer.php b/includes/installer/Installer.php index 064bd6df4f..91589e1af9 100644 --- a/includes/installer/Installer.php +++ b/includes/installer/Installer.php @@ -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 diff --git a/includes/installer/WebInstaller.php b/includes/installer/WebInstaller.php index 67a4defd2c..9edc25a709 100644 --- a/includes/installer/WebInstaller.php +++ b/includes/installer/WebInstaller.php @@ -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' ) )