From: Reedy Date: Mon, 12 Dec 2016 19:20:22 +0000 (+0000) Subject: Article::fetchContent() was removed X-Git-Tag: 1.31.0-rc.0~4616 X-Git-Url: http://git.heureux-cyclage.org/?p=lhc%2Fweb%2Fwiklou.git;a=commitdiff_plain;h=f7ae4d41b8675d714edf502288fd5308ad1e53db Article::fetchContent() was removed Bug: T145728 Change-Id: Ie8bc12e391f2983452bf472333ea3cfaa72e4918 --- diff --git a/RELEASE-NOTES-1.29 b/RELEASE-NOTES-1.29 index c493d755f9..e5d28c66bc 100644 --- a/RELEASE-NOTES-1.29 +++ b/RELEASE-NOTES-1.29 @@ -117,6 +117,7 @@ changes to languages because of Phabricator reports. * Class RevisiondeleteAction (deprecated in 1.25) was removed. * WikiPage::prepareTextForEdit() (deprecated in 1.21) was removed. * WikiPage::getText() (deprecated in 1.21) was removed. +* Article::fetchContent() (deprecated in 1.21) was removed. == Compatibility == diff --git a/includes/page/Article.php b/includes/page/Article.php index a051663ed9..6e3baced21 100644 --- a/includes/page/Article.php +++ b/includes/page/Article.php @@ -316,46 +316,6 @@ class Article implements Page { return $oldid; } - /** - * Get text of an article from database - * Does *NOT* follow redirects. - * - * @protected - * @note This is really internal functionality that should really NOT be - * used by other functions. For accessing article content, use the WikiPage - * class, especially WikiBase::getContent(). However, a lot of legacy code - * uses this method to retrieve page text from the database, so the function - * has to remain public for now. - * - * @return string|bool String containing article contents, or false if null - * @deprecated since 1.21, use WikiPage::getContent() instead - */ - function fetchContent() { - // BC cruft! - - wfDeprecated( __METHOD__, '1.21' ); - - if ( $this->mContentLoaded && $this->mContent ) { - return $this->mContent; - } - - $content = $this->fetchContentObject(); - - if ( !$content ) { - return false; - } - - // @todo Get rid of mContent everywhere! - $this->mContent = ContentHandler::getContentText( $content ); - ContentHandler::runLegacyHooks( - 'ArticleAfterFetchContent', - [ &$this, &$this->mContent ], - '1.21' - ); - - return $this->mContent; - } - /** * Get text content object * Does *NOT* follow redirects.