From a4d4c7cc419a08ee5fa69c61a060e8f5a81f1d15 Mon Sep 17 00:00:00 2001 From: daniel Date: Thu, 24 May 2012 12:01:19 +0200 Subject: [PATCH] B/C: making Article::getchContent public again --- includes/Article.php | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/includes/Article.php b/includes/Article.php index 57ccab2397..5bfc7712e8 100644 --- a/includes/Article.php +++ b/includes/Article.php @@ -325,10 +325,15 @@ class Article extends Page { * 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 mixed string containing article contents, or false if null - * @deprecated in 1.WD, use getContentObject() instead + * @deprecated in 1.WD, use WikiPage::getContent() instead */ - protected function fetchContent() { #BC cruft! + function fetchContent() { #BC cruft! wfDeprecated( __METHOD__, '1.WD' ); if ( $this->mContentLoaded && $this->mContent ) { @@ -353,6 +358,8 @@ class Article extends Page { * Does *NOT* follow redirects. * TODO: when is this null? * + * @note code that wants to retrieve page content from the database should use WikiPage::getContent(). + * * @return Content|null * * @since 1.WD -- 2.20.1