Removal of unused globals.
authorPlatonides <platonides@gmail.com>
Mon, 26 Nov 2012 21:15:11 +0000 (22:15 +0100)
committerPlatonides <platonides@gmail.com>
Mon, 26 Nov 2012 21:15:11 +0000 (22:15 +0100)
Change-Id: I870665d18f955a245222cfceca4665897277e7e4

includes/Article.php
includes/content/ContentHandler.php
includes/filerepo/file/LocalFile.php
maintenance/renderDump.php
tests/phpunit/includes/TitleMethodsTest.php
tests/phpunit/includes/content/ContentHandlerTest.php
tests/phpunit/includes/content/WikitextContentHandlerTest.php

index 1d2b023..5a887b6 100644 (file)
@@ -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__ );
 
index b61dc34..7d1be2b 100644 (file)
@@ -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
index da1e1fa..e8f2540 100644 (file)
@@ -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();
index ad9a380..2ba2b3d 100644 (file)
@@ -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!" );
index c12fb22..d430827 100644 (file)
@@ -10,7 +10,7 @@
 class TitleMethodsTest extends MediaWikiTestCase {
 
        public function setup() {
-               global $wgExtraNamespaces, $wgNamespaceContentModels, $wgContLang;
+               global $wgContLang;
 
                parent::setUp();
 
index 60baedc..73d0012 100644 (file)
@@ -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 {
index ed4846b..8121099 100644 (file)
@@ -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 );