B/C: making Article::getchContent public again
authordaniel <daniel.kinzler@wikimedia.de>
Thu, 24 May 2012 10:01:19 +0000 (12:01 +0200)
committerdaniel <daniel.kinzler@wikimedia.de>
Thu, 24 May 2012 10:01:19 +0000 (12:01 +0200)
includes/Article.php

index 57ccab2..5bfc771 100644 (file)
@@ -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