From: Reedy Date: Sat, 2 Apr 2016 08:34:14 +0000 (+0100) Subject: Article::getUndoText() and WikiPage::getUndoText were removed X-Git-Tag: 1.31.0-rc.0~7427^2 X-Git-Url: https://git.heureux-cyclage.org/?p=lhc%2Fweb%2Fwiklou.git;a=commitdiff_plain;h=042bd257816bc72679cb5a34855d41ef88817d03 Article::getUndoText() and WikiPage::getUndoText were removed Bug: T122754 Change-Id: I9eb4094e313325be3dfbf1409f8caffdcc3abfc2 Depends-On: I6aed90eb6064bb0d3055aed7b6cdefc45e6de878 --- diff --git a/RELEASE-NOTES-1.27 b/RELEASE-NOTES-1.27 index 12fb06e3b4..3c5dda63eb 100644 --- a/RELEASE-NOTES-1.27 +++ b/RELEASE-NOTES-1.27 @@ -396,6 +396,8 @@ changes to languages because of Phabricator reports. * Skin::newFromKey() was removed (deprecated since 1.24). * Skin::getUsableSkins() was removed (deprecated since 1.23). * LoadBalancer::pickRandom() was removed (deprecated in 1.21). +* Article::getUndoText() and WikiPage::getUndoText were removed (deprecated since + 1.21). == Compatibility == diff --git a/includes/page/Article.php b/includes/page/Article.php index 459e9f020e..6c42e3427e 100644 --- a/includes/page/Article.php +++ b/includes/page/Article.php @@ -2379,15 +2379,6 @@ class Article implements Page { return $this->mPage->getUndoContent( $undo, $undoafter ); } - /** - * Call to WikiPage function for backwards compatibility. - * @see WikiPage::getUndoText - */ - public function getUndoText( Revision $undo, Revision $undoafter = null ) { - ContentHandler::deprecated( __METHOD__, '1.21' ); - return $this->mPage->getUndoText( $undo, $undoafter ); - } - /** * Call to WikiPage function for backwards compatibility. * @see WikiPage::getUser diff --git a/includes/page/WikiPage.php b/includes/page/WikiPage.php index 48f2a7fd77..326f26ce14 100644 --- a/includes/page/WikiPage.php +++ b/includes/page/WikiPage.php @@ -1351,38 +1351,6 @@ class WikiPage implements Page, IDBAccessObject { return $handler->getUndoContent( $this->getRevision(), $undo, $undoafter ); } - /** - * Get the text that needs to be saved in order to undo all revisions - * between $undo and $undoafter. Revisions must belong to the same page, - * must exist and must not be deleted - * @param Revision $undo - * @param Revision $undoafter Must be an earlier revision than $undo - * @return string|bool String on success, false on failure - * @deprecated since 1.21: use ContentHandler::getUndoContent() instead. - */ - public function getUndoText( Revision $undo, Revision $undoafter = null ) { - ContentHandler::deprecated( __METHOD__, '1.21' ); - - $this->loadLastEdit(); - - if ( $this->mLastRevision ) { - if ( is_null( $undoafter ) ) { - $undoafter = $undo->getPrevious(); - } - - $handler = $this->getContentHandler(); - $undone = $handler->getUndoContent( $this->mLastRevision, $undo, $undoafter ); - - if ( !$undone ) { - return false; - } else { - return ContentHandler::getContentText( $undone ); - } - } - - return false; - } - /** * Returns true if this page's content model supports sections. *