r82493 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r82492‎ | r82493 | r82494 >
Date:22:08, 19 February 2011
Author:reedy
Status:ok
Tags:
Comment:
More function documentation
Modified paths:
  • /trunk/phase3/includes/revisiondelete/RevisionDelete.php (modified) (history)
  • /trunk/phase3/includes/revisiondelete/RevisionDeleter.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/revisiondelete/RevisionDelete.php
@@ -292,6 +292,10 @@
293293 var $authorNameField = 'oi_user_text';
294294 var $storeBatch, $deleteBatch, $cleanupBatch;
295295
 296+ /**
 297+ * @param $db DatabaseBase
 298+ * @return mixed
 299+ */
296300 public function doQuery( $db ) {
297301 $archiveNames = array();
298302 foreach( $this->ids as $timestamp ) {
@@ -515,7 +519,11 @@
516520 var $dateField = 'fa_timestamp';
517521 var $authorIdField = 'fa_user';
518522 var $authorNameField = 'fa_user_text';
519 -
 523+
 524+ /**
 525+ * @param $db DatabaseBase
 526+ * @return mixed
 527+ */
520528 public function doQuery( $db ) {
521529 $ids = array_map( 'intval', $this->ids );
522530 return $db->select( 'filearchive', '*',
@@ -593,6 +601,10 @@
594602 var $authorIdField = 'log_user';
595603 var $authorNameField = 'log_user_text';
596604
 605+ /**
 606+ * @param $db DatabaseBase
 607+ * @return mixed
 608+ */
597609 public function doQuery( $db ) {
598610 $ids = array_map( 'intval', $this->ids );
599611 return $db->select( 'logging', '*',
Index: trunk/phase3/includes/revisiondelete/RevisionDeleter.php
@@ -125,10 +125,17 @@
126126 return null;
127127 }
128128 }
129 -
130 - // Checks if a revision still exists in the revision table.
131 - // If it doesn't, returns the corresponding ar_timestamp field
132 - // so that this key can be used instead.
 129+
 130+ /**
 131+ * Checks if a revision still exists in the revision table.
 132+ * If it doesn't, returns the corresponding ar_timestamp field
 133+ * so that this key can be used instead.
 134+ *
 135+ * @static
 136+ * @param $title Title
 137+ * @param $revid
 138+ * @return bool|mixed
 139+ */
133140 public static function checkRevisionExistence( $title, $revid ) {
134141 $dbr = wfGetDB( DB_SLAVE );
135142 $exists = $dbr->selectField( 'revision', '1',
@@ -145,8 +152,17 @@
146153
147154 return $timestamp;
148155 }
149 -
150 - // Creates utility links for log entries.
 156+
 157+ /**
 158+ * Creates utility links for log entries.
 159+ *
 160+ * @static
 161+ * @param $title Title
 162+ * @param $paramArray Array
 163+ * @param $skin Skin
 164+ * @param $messages
 165+ * @return String
 166+ */
151167 public static function getLogLinks( $title, $paramArray, $skin, $messages ) {
152168 global $wgLang;
153169
@@ -215,7 +231,7 @@
216232 }
217233
218234 // View/modify link...
219 - if ( count($undeletedRevisions) ) {
 235+ if ( count( $undeletedRevisions ) ) {
220236 // FIXME THIS IS A HORRIBLE HORRIBLE HACK AND SHOULD DIE
221237 // It's not possible to pass a list of both deleted and
222238 // undeleted revisions to SpecialRevisionDelete, so we're
@@ -229,7 +245,7 @@
230246 array(
231247 'target' => $title->getPrefixedText(),
232248 'type' => $originalKey,
233 - 'ids' => implode(',', $undeletedRevisions),
 249+ 'ids' => implode( ',', $undeletedRevisions ),
234250 ),
235251 array( 'known', 'noclasses' )
236252 );

Status & tagging log