From 4e8687a884eca8ff22d0546a12d37f1bc24361be Mon Sep 17 00:00:00 2001 From: Siebrand Mazeland Date: Fri, 27 Dec 2013 17:20:51 +0100 Subject: [PATCH] Remove deprecated methods from Revision, SkinTemplate, and WikiPage No uses found in core of Gerrit extensions. - Revision::revText() (deprecated in 1.17) - SkinTemplate::jstext() (deprecated in 1.21) - WikiPage::quickEdit() (deprecated in 1.18) - WikiPage::useParserCache() (deprecated in 1.18) - WikiPage::viewUpdates() (deprecated in 1.18) Change-Id: I9eee23ea3ce381b6b8373da899287bcaea4cead4 --- RELEASE-NOTES-1.23 | 5 ++++ includes/Revision.php | 11 ------- includes/SkinTemplate.php | 9 ------ includes/WikiPage.php | 29 ------------------- .../phpunit/includes/RevisionStorageTest.php | 11 ------- 5 files changed, 5 insertions(+), 60 deletions(-) diff --git a/RELEASE-NOTES-1.23 b/RELEASE-NOTES-1.23 index 7c96124177..db64b9c297 100644 --- a/RELEASE-NOTES-1.23 +++ b/RELEASE-NOTES-1.23 @@ -107,7 +107,12 @@ production. - Linker::makeBrokenLinkObj() (deprecated in 1.16) - Linker::makeColouredLinkObj() (deprecated in 1.16) - Linker::makeSizeLinkObj() (deprecated in 1.17) + - Revision::revText() (deprecated in 1.17) + - SkinTemplate::jstext() (deprecated in 1.21) - SpecialRevisionDelete::extractBitField() (deprecated in 1.22) + - WikiPage::quickEdit() (deprecated in 1.18) + - WikiPage::useParserCache() (deprecated in 1.18) + - WikiPage::viewUpdates() (deprecated in 1.18) === Languages updated in 1.23 === diff --git a/includes/Revision.php b/includes/Revision.php index f066110124..71b1858687 100644 --- a/includes/Revision.php +++ b/includes/Revision.php @@ -1010,17 +1010,6 @@ class Revision implements IDBAccessObject { } } - /** - * Alias for getText(Revision::FOR_THIS_USER) - * - * @deprecated since 1.17 - * @return String - */ - public function revText() { - wfDeprecated( __METHOD__, '1.17' ); - return $this->getText( self::FOR_THIS_USER ); - } - /** * Fetch revision text without regard for view restrictions * diff --git a/includes/SkinTemplate.php b/includes/SkinTemplate.php index 3ad2f8e29c..18e36ba426 100644 --- a/includes/SkinTemplate.php +++ b/includes/SkinTemplate.php @@ -1403,15 +1403,6 @@ abstract class QuickTemplate { echo htmlspecialchars( $this->data[$str] ); } - /** - * @private - * @deprecated since 1.21; use Xml::encodeJsVar() or Xml::encodeJsCall() instead - */ - function jstext( $str ) { - wfDeprecated( __METHOD__, '1.21' ); - echo Xml::escapeJsString( $this->data[$str] ); - } - /** * @private */ diff --git a/includes/WikiPage.php b/includes/WikiPage.php index cc65ee8fda..d4acb6f4fd 100644 --- a/includes/WikiPage.php +++ b/includes/WikiPage.php @@ -3398,35 +3398,6 @@ class WikiPage implements Page, IDBAccessObject { return $this->doUpdateRestrictions( $limit, $expiry, $cascade, $reason, $user )->isOK(); } - /** - * @deprecated since 1.18 - */ - public function quickEdit( $text, $comment = '', $minor = 0 ) { - wfDeprecated( __METHOD__, '1.18' ); - global $wgUser; - $this->doQuickEdit( $text, $wgUser, $comment, $minor ); - } - - /** - * @deprecated since 1.18 - */ - public function viewUpdates() { - wfDeprecated( __METHOD__, '1.18' ); - global $wgUser; - $this->doViewUpdates( $wgUser ); - } - - /** - * @deprecated since 1.18 - * @param $oldid int - * @return bool - */ - public function useParserCache( $oldid ) { - wfDeprecated( __METHOD__, '1.18' ); - global $wgUser; - return $this->isParserCacheUsed( ParserOptions::newFromUser( $wgUser ), $oldid ); - } - /** * Returns a list of updates to be performed when this page is deleted. The updates should remove any information * about this page from secondary data stores such as links tables. diff --git a/tests/phpunit/includes/RevisionStorageTest.php b/tests/phpunit/includes/RevisionStorageTest.php index cd2a23af1c..f69fad42ed 100644 --- a/tests/phpunit/includes/RevisionStorageTest.php +++ b/tests/phpunit/includes/RevisionStorageTest.php @@ -297,17 +297,6 @@ class RevisionStorageTest extends MediaWikiTestCase { $this->assertEquals( 'hello hello.', $rev->getContent()->getNativeData() ); } - /** - * @covers Revision::revText - */ - public function testRevText() { - $this->hideDeprecated( 'Revision::revText' ); - $orig = $this->makeRevision( array( 'text' => 'hello hello rev.' ) ); - $rev = Revision::newFromId( $orig->getId() ); - - $this->assertEquals( 'hello hello rev.', $rev->revText() ); - } - /** * @covers Revision::getRawText */ -- 2.20.1