From 6080ded0cc3e44bf1c1b495a37b076e7a869bdb6 Mon Sep 17 00:00:00 2001 From: withoutaname Date: Tue, 22 Jul 2014 22:07:04 -0700 Subject: [PATCH] Remove deprecated class StubContLang Change-Id: I4569f5d59018f0d5082888fdc737cf30370bcbdd --- RELEASE-NOTES-1.24 | 1 + includes/AutoLoader.php | 1 - includes/StubObject.php | 29 ------------------- tests/parser/parserTest.inc | 1 - .../phpunit/suites/UploadFromUrlTestSuite.php | 1 - 5 files changed, 1 insertion(+), 32 deletions(-) diff --git a/RELEASE-NOTES-1.24 b/RELEASE-NOTES-1.24 index 37ddc66171..6d13c91576 100644 --- a/RELEASE-NOTES-1.24 +++ b/RELEASE-NOTES-1.24 @@ -315,6 +315,7 @@ changes to languages because of Bugzilla reports. * RevertFileAction - Use RevertAction directly * HistoryPage - Use HistoryAction directly * RawPage - Use RawAction directly +* StubContLang - Use Language::factory() instead == Compatibility == diff --git a/includes/AutoLoader.php b/includes/AutoLoader.php index 046a0df8bc..139368523c 100644 --- a/includes/AutoLoader.php +++ b/includes/AutoLoader.php @@ -165,7 +165,6 @@ $wgAutoloadLocalClasses = array( 'Status' => 'includes/Status.php', 'StreamFile' => 'includes/StreamFile.php', 'StringPrefixSearch' => 'includes/PrefixSearch.php', - 'StubContLang' => 'includes/StubObject.php', 'StubObject' => 'includes/StubObject.php', 'StubUserLang' => 'includes/StubObject.php', 'TablePager' => 'includes/Pager.php', diff --git a/includes/StubObject.php b/includes/StubObject.php index fb9b3e455c..ee1df295ed 100644 --- a/includes/StubObject.php +++ b/includes/StubObject.php @@ -163,35 +163,6 @@ class StubObject { } } -/** - * Stub object for the content language of this wiki. This object have to be in - * $wgContLang global. - * - * @deprecated since 1.18 - */ -class StubContLang extends StubObject { - - function __construct() { - wfDeprecated( __CLASS__, '1.18' ); - parent::__construct( 'wgContLang' ); - } - - function __call( $name, $args ) { - return $this->_call( $name, $args ); - } - - /** - * @return Language - */ - function _newObject() { - global $wgLanguageCode; - $obj = Language::factory( $wgLanguageCode ); - $obj->initEncoding(); - $obj->initContLang(); - return $obj; - } -} - /** * Stub object for the user language. It depends of the user preferences and * "uselang" parameter that can be passed to index.php. This object have to be diff --git a/tests/parser/parserTest.inc b/tests/parser/parserTest.inc index 027c7b9b00..5d05ca0daf 100644 --- a/tests/parser/parserTest.inc +++ b/tests/parser/parserTest.inc @@ -208,7 +208,6 @@ class ParserTest { $messageMemc = wfGetMessageCacheStorage(); $parserMemc = wfGetParserCacheStorage(); - // $wgContLang = new StubContLang; $wgUser = new User; $context = new RequestContext; $wgLang = $context->getLanguage(); diff --git a/tests/phpunit/suites/UploadFromUrlTestSuite.php b/tests/phpunit/suites/UploadFromUrlTestSuite.php index b27337b21b..bd82d21921 100644 --- a/tests/phpunit/suites/UploadFromUrlTestSuite.php +++ b/tests/phpunit/suites/UploadFromUrlTestSuite.php @@ -62,7 +62,6 @@ class UploadFromUrlTestSuite extends PHPUnit_Framework_TestSuite { $messageMemc = wfGetMessageCacheStorage(); $parserMemc = wfGetParserCacheStorage(); - // $wgContLang = new StubContLang; $wgUser = new User; $context = new RequestContext; $wgLang = $context->getLanguage(); -- 2.20.1