From: Sam Reed Date: Wed, 3 Aug 2011 00:19:27 +0000 (+0000) Subject: Tweak/add to documentation X-Git-Tag: 1.31.0-rc.0~28470 X-Git-Url: https://git.cyclocoop.org/admin/?a=commitdiff_plain;h=a2bf7c35f7c1300fc06efd1ebd225a3f9b18eb45;p=lhc%2Fweb%2Fwiklou.git Tweak/add to documentation Remove old compat constants for "1.6 compatibility" --- diff --git a/includes/Revision.php b/includes/Revision.php index 527f0e188d..11b5722a68 100644 --- a/includes/Revision.php +++ b/includes/Revision.php @@ -335,15 +335,17 @@ class Revision { $this->mTimestamp = $row->rev_timestamp; $this->mDeleted = intval( $row->rev_deleted ); - if( !isset( $row->rev_parent_id ) ) + if( !isset( $row->rev_parent_id ) ) { $this->mParentId = is_null($row->rev_parent_id) ? null : 0; - else + } else { $this->mParentId = intval( $row->rev_parent_id ); + } - if( !isset( $row->rev_len ) || is_null( $row->rev_len ) ) + if( !isset( $row->rev_len ) || is_null( $row->rev_len ) ) { $this->mSize = null; - else + } else { $this->mSize = intval( $row->rev_len ); + } if( isset( $row->page_latest ) ) { $this->mCurrent = ( $row->rev_id == $row->page_latest ); @@ -445,8 +447,7 @@ class Revision { 'rev_id' => $this->mId ), 'Revision::getTitle' ); if( $row ) { - $this->mTitle = Title::makeTitle( $row->page_namespace, - $row->page_title ); + $this->mTitle = Title::makeTitle( $row->page_namespace, $row->page_title ); } return $this->mTitle; } @@ -592,7 +593,7 @@ class Revision { } /** - * int $field one of DELETED_* bitfield constants + * @param $field int one of DELETED_* bitfield constants * * @return Boolean */ @@ -602,6 +603,8 @@ class Revision { /** * Get the deletion bitfield of the revision + * + * @return int */ public function getVisibility() { return (int)$this->mDeleted; @@ -1098,11 +1101,3 @@ class Revision { return 0; } } - -/** - * Aliases for backwards compatibility with 1.6 - */ -define( 'MW_REV_DELETED_TEXT', Revision::DELETED_TEXT ); -define( 'MW_REV_DELETED_COMMENT', Revision::DELETED_COMMENT ); -define( 'MW_REV_DELETED_USER', Revision::DELETED_USER ); -define( 'MW_REV_DELETED_RESTRICTED', Revision::DELETED_RESTRICTED );