From eda718909ccadbeda0df126f49a78336471190c1 Mon Sep 17 00:00:00 2001 From: Platonides Date: Sun, 31 Oct 2010 15:35:01 +0000 Subject: [PATCH] Remove unused globals. --- includes/Title.php | 2 +- includes/Wiki.php | 2 +- includes/resourceloader/ResourceLoaderFileModule.php | 6 ++---- includes/specials/SpecialUserlogin.php | 2 +- 4 files changed, 5 insertions(+), 7 deletions(-) diff --git a/includes/Title.php b/includes/Title.php index 517fdea659..cec0067f37 100644 --- a/includes/Title.php +++ b/includes/Title.php @@ -863,7 +863,7 @@ class Title { */ public function getLocalURL( $query = '', $variant = false ) { global $wgArticlePath, $wgScript, $wgServer, $wgRequest; - global $wgVariantArticlePath, $wgContLang, $wgUser; + global $wgVariantArticlePath, $wgContLang; if ( is_array( $query ) ) { $query = wfArrayToCGI( $query ); diff --git a/includes/Wiki.php b/includes/Wiki.php index 7845f8ff0c..aaced4802e 100644 --- a/includes/Wiki.php +++ b/includes/Wiki.php @@ -179,7 +179,7 @@ class MediaWiki { */ function handleSpecialCases( &$title, &$output, $request ) { wfProfileIn( __METHOD__ ); - global $wgContLang, $wgUser; + $action = $this->getVal( 'Action' ); // Invalid titles. Bug 21776: The interwikis must redirect even if the page name is empty. diff --git a/includes/resourceloader/ResourceLoaderFileModule.php b/includes/resourceloader/ResourceLoaderFileModule.php index c3d53a8656..81c0f42b26 100644 --- a/includes/resourceloader/ResourceLoaderFileModule.php +++ b/includes/resourceloader/ResourceLoaderFileModule.php @@ -187,7 +187,7 @@ class ResourceLoaderFileModule extends ResourceLoaderModule { * @return {string} JavaScript code for $context */ public function getScript( ResourceLoaderContext $context ) { - global $wgServer, $wgScriptPath; + global $wgServer; $files = array_merge( $this->scripts, @@ -432,9 +432,7 @@ class ResourceLoaderFileModule extends ResourceLoaderModule { * @param {string} $path File path of script file to read * @return {string} CSS data in script file */ - protected function readStyleFile( $path ) { - global $wgScriptPath; - + protected function readStyleFile( $path ) { $style = file_get_contents( $this->getLocalPath( $path ) ); $dir = $this->getLocalPath( dirname( $path ) ); $remoteDir = $this->getRemotePath( dirname( $path ) ); diff --git a/includes/specials/SpecialUserlogin.php b/includes/specials/SpecialUserlogin.php index 7561ee2e3a..210e2d1adb 100644 --- a/includes/specials/SpecialUserlogin.php +++ b/includes/specials/SpecialUserlogin.php @@ -947,7 +947,7 @@ class LoginForm { global $wgUser, $wgOut, $wgHiddenPrefs, $wgEnableEmail; global $wgRequest, $wgLoginLanguageSelector; global $wgAuth, $wgEmailConfirmToEdit, $wgCookieExpiration; - global $wgSecureLogin, $wgSecureLoginStickHTTPS; + global $wgSecureLogin; $titleObj = SpecialPage::getTitleFor( 'Userlogin' ); -- 2.20.1