More function documentation
authorSam Reed <reedy@users.mediawiki.org>
Sat, 19 Feb 2011 22:08:26 +0000 (22:08 +0000)
committerSam Reed <reedy@users.mediawiki.org>
Sat, 19 Feb 2011 22:08:26 +0000 (22:08 +0000)
includes/revisiondelete/RevisionDelete.php
includes/revisiondelete/RevisionDeleter.php

index 5a2b043..c331ec6 100644 (file)
@@ -292,6 +292,10 @@ class RevDel_FileList extends RevDel_List {
        var $authorNameField = 'oi_user_text';
        var $storeBatch, $deleteBatch, $cleanupBatch;
 
+       /**
+        * @param $db DatabaseBase
+        * @return mixed
+        */
        public function doQuery( $db ) {
                $archiveNames = array();
                foreach( $this->ids as $timestamp ) {
@@ -515,7 +519,11 @@ class RevDel_ArchivedFileList extends RevDel_FileList {
        var $dateField = 'fa_timestamp';
        var $authorIdField = 'fa_user';
        var $authorNameField = 'fa_user_text';
-       
+
+       /**
+        * @param $db DatabaseBase
+        * @return mixed
+        */
        public function doQuery( $db ) {
                $ids = array_map( 'intval', $this->ids );
                return $db->select( 'filearchive', '*',
@@ -593,6 +601,10 @@ class RevDel_LogList extends RevDel_List {
        var $authorIdField = 'log_user';
        var $authorNameField = 'log_user_text';
 
+       /**
+        * @param $db DatabaseBase
+        * @return mixed
+        */
        public function doQuery( $db ) {
                $ids = array_map( 'intval', $this->ids );
                return $db->select( 'logging', '*',
index 5caba11..2450bb8 100644 (file)
@@ -125,10 +125,17 @@ class RevisionDeleter {
                        return null;
                }
        }
-       
-       // Checks if a revision still exists in the revision table.
-       //  If it doesn't, returns the corresponding ar_timestamp field
-       //  so that this key can be used instead.
+
+       /**
+        * Checks if a revision still exists in the revision table.
+        * If it doesn't, returns the corresponding ar_timestamp field
+        * so that this key can be used instead.
+        *
+        * @static
+        * @param $title Title
+        * @param  $revid
+        * @return bool|mixed
+        */
        public static function checkRevisionExistence( $title, $revid ) {
                $dbr = wfGetDB( DB_SLAVE );
                $exists = $dbr->selectField( 'revision', '1',
@@ -145,8 +152,17 @@ class RevisionDeleter {
                
                return $timestamp;
        }
-       
-       // Creates utility links for log entries.
+
+       /**
+        * Creates utility links for log entries.
+        *
+        * @static
+        * @param $title Title
+        * @param $paramArray Array
+        * @param $skin Skin
+        * @param $messages
+        * @return String
+        */
        public static function getLogLinks( $title, $paramArray, $skin, $messages ) {
                global $wgLang;
                
@@ -215,7 +231,7 @@ class RevisionDeleter {
                        }
                        
                        // View/modify link...
-                       if ( count($undeletedRevisions) ) {
+                       if ( count( $undeletedRevisions ) ) {
                                // FIXME THIS IS A HORRIBLE HORRIBLE HACK AND SHOULD DIE
                                // It's not possible to pass a list of both deleted and
                                // undeleted revisions to SpecialRevisionDelete, so we're
@@ -229,7 +245,7 @@ class RevisionDeleter {
                                        array(
                                                'target' => $title->getPrefixedText(),
                                                'type' => $originalKey,
-                                               'ids' => implode(',', $undeletedRevisions),
+                                               'ids' => implode( ',', $undeletedRevisions ),
                                        ),
                                        array( 'known', 'noclasses' )
                                );