http://www.mediawiki.org/wiki/Special:Code/MediaWiki/93792

Revision: 93792
Author:   reedy
Date:     2011-08-03 00:19:27 +0000 (Wed, 03 Aug 2011)
Log Message:
-----------
Tweak/add to documentation

Remove old compat constants for "1.6 compatibility"

Modified Paths:
--------------
    trunk/phase3/includes/Revision.php

Modified: trunk/phase3/includes/Revision.php
===================================================================
--- trunk/phase3/includes/Revision.php  2011-08-03 00:05:35 UTC (rev 93791)
+++ trunk/phase3/includes/Revision.php  2011-08-03 00:19:27 UTC (rev 93792)
@@ -335,15 +335,17 @@
                        $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 @@
                                   '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 @@
        }
 
        /**
-        * int $field one of DELETED_* bitfield constants
+        * @param $field int one of DELETED_* bitfield constants
         *
         * @return Boolean
         */
@@ -602,6 +603,8 @@
 
        /**
         * Get the deletion bitfield of the revision
+        *
+        * @return int
         */
        public function getVisibility() {
                return (int)$this->mDeleted;
@@ -1098,11 +1101,3 @@
                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 );


_______________________________________________
MediaWiki-CVS mailing list
MediaWiki-CVS@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs

Reply via email to