From fb79ce2e32a01387b2b30320b3c6fe959bcc6189 Mon Sep 17 00:00:00 2001 From: Sam Reed Date: Sat, 19 Feb 2011 22:08:26 +0000 Subject: [PATCH] More function documentation --- includes/revisiondelete/RevisionDelete.php | 14 ++++++++- includes/revisiondelete/RevisionDeleter.php | 32 +++++++++++++++------ 2 files changed, 37 insertions(+), 9 deletions(-) diff --git a/includes/revisiondelete/RevisionDelete.php b/includes/revisiondelete/RevisionDelete.php index 5a2b043562..c331ec6162 100644 --- a/includes/revisiondelete/RevisionDelete.php +++ b/includes/revisiondelete/RevisionDelete.php @@ -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', '*', diff --git a/includes/revisiondelete/RevisionDeleter.php b/includes/revisiondelete/RevisionDeleter.php index 5caba11e71..2450bb8f36 100644 --- a/includes/revisiondelete/RevisionDeleter.php +++ b/includes/revisiondelete/RevisionDeleter.php @@ -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' ) ); -- 2.20.1