From: aude Date: Tue, 21 Aug 2012 09:49:01 +0000 (+0000) Subject: add docs for getContentInternal() X-Git-Tag: 1.31.0-rc.0~22097^2^2~57 X-Git-Url: http://git.cyclocoop.org/%40spipnet%40?a=commitdiff_plain;h=5f7b761fa41957d5d3fa7c97fbdc3fb38b677138;p=lhc%2Fweb%2Fwiklou.git add docs for getContentInternal() Change-Id: I87a0c9908975c236794bad39209ad8bdef4699c3 --- diff --git a/includes/Revision.php b/includes/Revision.php index 30ffbea35a..0e4ec76a70 100644 --- a/includes/Revision.php +++ b/includes/Revision.php @@ -882,9 +882,10 @@ class Revision implements IDBAccessObject { * Revision::RAW get the text regardless of permissions * @param $user User object to check for, only if FOR_THIS_USER is passed * to the $audience parameter - * @return String + * * @deprecated in 1.WD, use getContent() instead * @todo: replace usage in core + * @return String */ public function getText( $audience = self::FOR_PUBLIC, User $user = null ) { wfDeprecated( __METHOD__, '1.WD' ); @@ -904,9 +905,8 @@ class Revision implements IDBAccessObject { * Revision::RAW get the text regardless of permissions * @param $user User object to check for, only if FOR_THIS_USER is passed * to the $audience parameter - * @return Content - * * @since 1.WD + * @return Content */ public function getContent( $audience = self::FOR_PUBLIC, User $user = null ) { if( $audience == self::FOR_PUBLIC && $this->isDeleted( self::DELETED_TEXT ) ) { @@ -946,14 +946,19 @@ class Revision implements IDBAccessObject { /** * Fetch original serialized data without regard for view restrictions * - * @return String - * * @since 1.WD + * @return String */ public function getSerializedData() { return $this->mText; } + /** + * Gets the content object for the revision + * + * @since 1.WD + * @return Content + */ protected function getContentInternal() { if( is_null( $this->mContent ) ) { // Revision is immutable. Load on demand: