From 84e1e6b5aed6242154dc6c26adc5ea8f026c9728 Mon Sep 17 00:00:00 2001 From: Platonides Date: Mon, 26 Nov 2012 22:15:11 +0100 Subject: [PATCH] Removal of unused globals. Change-Id: I870665d18f955a245222cfceca4665897277e7e4 --- includes/Article.php | 2 +- includes/content/ContentHandler.php | 2 -- includes/filerepo/file/LocalFile.php | 1 - maintenance/renderDump.php | 2 -- tests/phpunit/includes/TitleMethodsTest.php | 2 +- tests/phpunit/includes/content/ContentHandlerTest.php | 2 -- tests/phpunit/includes/content/WikitextContentHandlerTest.php | 2 -- 7 files changed, 2 insertions(+), 11 deletions(-) diff --git a/includes/Article.php b/includes/Article.php index 1d2b0233b4..5a887b6e8f 100644 --- a/includes/Article.php +++ b/includes/Article.php @@ -515,7 +515,7 @@ class Article extends Page { * page of the given title. */ public function view() { - global $wgParser, $wgUseFileCache, $wgUseETag, $wgDebugToolbar; + global $wgUseFileCache, $wgUseETag, $wgDebugToolbar; wfProfileIn( __METHOD__ ); diff --git a/includes/content/ContentHandler.php b/includes/content/ContentHandler.php index b61dc34e4b..7d1be2b39c 100644 --- a/includes/content/ContentHandler.php +++ b/includes/content/ContentHandler.php @@ -712,8 +712,6 @@ abstract class ContentHandler { * @return string An appropriate auto-summary, or an empty string. */ public function getAutosummary( Content $oldContent = null, Content $newContent = null, $flags ) { - global $wgContLang; - // Decide what kind of auto-summary is needed. // Redirect auto-summaries diff --git a/includes/filerepo/file/LocalFile.php b/includes/filerepo/file/LocalFile.php index da1e1fa4bd..e8f2540bf9 100644 --- a/includes/filerepo/file/LocalFile.php +++ b/includes/filerepo/file/LocalFile.php @@ -1497,7 +1497,6 @@ class LocalFile extends File { * @return bool|mixed */ function getDescriptionText() { - global $wgParser; $revision = Revision::newFromTitle( $this->title, false, Revision::READ_NORMAL ); if ( !$revision ) return false; $content = $revision->getContent(); diff --git a/maintenance/renderDump.php b/maintenance/renderDump.php index ad9a380f7b..2ba2b3dce3 100644 --- a/maintenance/renderDump.php +++ b/maintenance/renderDump.php @@ -80,8 +80,6 @@ class DumpRenderer extends Maintenance { * @param $rev Revision */ public function handleRevision( $rev ) { - global $wgParserConf; - $title = $rev->getTitle(); if ( !$title ) { $this->error( "Got bogus revision with null title!" ); diff --git a/tests/phpunit/includes/TitleMethodsTest.php b/tests/phpunit/includes/TitleMethodsTest.php index c12fb22897..d430827132 100644 --- a/tests/phpunit/includes/TitleMethodsTest.php +++ b/tests/phpunit/includes/TitleMethodsTest.php @@ -10,7 +10,7 @@ class TitleMethodsTest extends MediaWikiTestCase { public function setup() { - global $wgExtraNamespaces, $wgNamespaceContentModels, $wgContLang; + global $wgContLang; parent::setUp(); diff --git a/tests/phpunit/includes/content/ContentHandlerTest.php b/tests/phpunit/includes/content/ContentHandlerTest.php index 60baedc614..73d0012f3f 100644 --- a/tests/phpunit/includes/content/ContentHandlerTest.php +++ b/tests/phpunit/includes/content/ContentHandlerTest.php @@ -233,8 +233,6 @@ class ContentHandlerTest extends MediaWikiTestCase { * @dataProvider dataMakeContent */ public function testMakeContent( $data, $title, $modelId, $format, $expectedModelId, $expectedNativeData, $shouldFail ) { - global $wgExtraNamespaces, $wgNamespaceContentModels, $wgContentHandlers; - $title = Title::newFromText( $title ); try { diff --git a/tests/phpunit/includes/content/WikitextContentHandlerTest.php b/tests/phpunit/includes/content/WikitextContentHandlerTest.php index ed4846bed1..8121099c97 100644 --- a/tests/phpunit/includes/content/WikitextContentHandlerTest.php +++ b/tests/phpunit/includes/content/WikitextContentHandlerTest.php @@ -160,8 +160,6 @@ class WikitextContentHandlerTest extends MediaWikiLangTestCase { * @dataProvider dataGetAutosummary */ public function testGetAutosummary( $old, $new, $flags, $expected ) { - global $wgLanguageCode, $wgContLang; - $oldContent = is_null( $old ) ? null : new WikitextContent( $old ); $newContent = is_null( $new ) ? null : new WikitextContent( $new ); -- 2.20.1