r85381 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r85380‎ | r85381 | r85382 >
Date:21:23, 4 April 2011
Author:reedy
Status:ok
Tags:
Comment:
Documentation, fix indenting
Modified paths:
  • /trunk/phase3/includes/ChangesList.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/ChangesList.php
@@ -16,6 +16,11 @@
1717 var $curlink , $difflink, $lastlink, $usertalklink, $versionlink;
1818 var $userlink, $timestamp, $watched;
1919
 20+ /**
 21+ * @static
 22+ * @param $rc RecentChange
 23+ * @return RCCacheEntry
 24+ */
2025 static function newFromParent( $rc ) {
2126 $rc2 = new RCCacheEntry;
2227 $rc2->mAttribs = $rc->mAttribs;
@@ -28,6 +33,10 @@
2934 * Base class for all changes lists
3035 */
3136 class ChangesList {
 37+
 38+ /**
 39+ * @var Skin
 40+ */
3241 public $skin;
3342 protected $watchlist = false;
3443
@@ -83,7 +92,7 @@
8493
8594 /**
8695 * Returns the appropriate flags for new page, minor change and patrolling
87 - * @param $flags Associative array of 'flag' => Bool
 96+ * @param $flags Array Associative array of 'flag' => Bool
8897 * @param $nothing String to use for empty space
8998 * @return String
9099 */
@@ -196,6 +205,11 @@
197206 }
198207 }
199208
 209+ /**
 210+ * @param $s
 211+ * @param $rc RecentChange
 212+ * @return void
 213+ */
200214 public function insertMove( &$s, $rc ) {
201215 # Diff
202216 $s .= '(' . $this->message['diff'] . ') (';
@@ -253,6 +267,12 @@
254268 ) . ')';
255269 }
256270
 271+ /**
 272+ * @param $s
 273+ * @param $rc RecentChange
 274+ * @param $unpatrolled
 275+ * @return void
 276+ */
257277 public function insertDiffHist( &$s, &$rc, $unpatrolled ) {
258278 # Diff link
259279 if( $rc->mAttribs['rc_type'] == RC_NEW || $rc->mAttribs['rc_type'] == RC_LOG ) {
@@ -293,6 +313,13 @@
294314 $s .= ') . . ';
295315 }
296316
 317+ /**
 318+ * @param $s
 319+ * @param $rc RecentChange
 320+ * @param $unpatrolled
 321+ * @param $watched
 322+ * @return void
 323+ */
297324 public function insertArticleLink( &$s, &$rc, $unpatrolled, $watched ) {
298325 global $wgContLang;
299326 # If it's a new article, there is no diff link, but if it hasn't been
@@ -334,23 +361,34 @@
335362 $s .= " $articlelink";
336363 }
337364
 365+ /**
 366+ * @param $s
 367+ * @param $rc RecentChange
 368+ * @return void
 369+ */
338370 public function insertTimestamp( &$s, $rc ) {
339371 global $wgLang;
340372 $s .= $this->message['semicolon-separator'] .
341373 $wgLang->time( $rc->mAttribs['rc_timestamp'], true, true ) . ' . . ';
342374 }
343375
344 - /** Insert links to user page, user talk page and eventually a blocking link */
 376+ /** Insert links to user page, user talk page and eventually a blocking link
 377+ *
 378+ * @param $rc RecentChange
 379+ */
345380 public function insertUserRelatedLinks( &$s, &$rc ) {
346381 if( $this->isDeleted( $rc, Revision::DELETED_USER ) ) {
347 - $s .= ' <span class="history-deleted">' . wfMsgHtml( 'rev-deleted-user' ) . '</span>';
 382+ $s .= ' <span class="history-deleted">' . wfMsgHtml( 'rev-deleted-user' ) . '</span>';
348383 } else {
349 - $s .= $this->skin->userLink( $rc->mAttribs['rc_user'], $rc->mAttribs['rc_user_text'] );
350 - $s .= $this->skin->userToolLinks( $rc->mAttribs['rc_user'], $rc->mAttribs['rc_user_text'] );
 384+ $s .= $this->skin->userLink( $rc->mAttribs['rc_user'], $rc->mAttribs['rc_user_text'] );
 385+ $s .= $this->skin->userToolLinks( $rc->mAttribs['rc_user'], $rc->mAttribs['rc_user_text'] );
351386 }
352387 }
353388
354 - /** insert a formatted action */
 389+ /** insert a formatted action
 390+ *
 391+ * @param $rc RecentChange
 392+ */
355393 public function insertAction( &$s, &$rc ) {
356394 if( $rc->mAttribs['rc_type'] == RC_LOG ) {
357395 if( $this->isDeleted( $rc, LogPage::DELETED_ACTION ) ) {
@@ -362,7 +400,10 @@
363401 }
364402 }
365403
366 - /** insert a formatted comment */
 404+ /** insert a formatted comment
 405+ *
 406+ * @param $rc RecentChange
 407+ */
367408 public function insertComment( &$s, &$rc ) {
368409 if( $rc->mAttribs['rc_type'] != RC_MOVE && $rc->mAttribs['rc_type'] != RC_MOVE_OVER_REDIRECT ) {
369410 if( $this->isDeleted( $rc, Revision::DELETED_COMMENT ) ) {
@@ -432,7 +473,11 @@
433474 }
434475 }
435476
436 - /** Inserts a rollback link */
 477+ /** Inserts a rollback link
 478+ *
 479+ * @param $s
 480+ * @param $rc RecentChange
 481+ */
437482 public function insertRollback( &$s, &$rc ) {
438483 global $wgUser;
439484 if( !$rc->mAttribs['rc_new'] && $rc->mAttribs['rc_this_oldid'] && $rc->mAttribs['rc_cur_id'] ) {
@@ -453,6 +498,12 @@
454499 }
455500 }
456501
 502+ /**
 503+ * @param $s
 504+ * @param $rc RecentChange
 505+ * @param $classes
 506+ * @return
 507+ */
457508 public function insertTags( &$s, &$rc, &$classes ) {
458509 if ( empty($rc->mAttribs['ts_tags']) )
459510 return;
@@ -474,6 +525,8 @@
475526 class OldChangesList extends ChangesList {
476527 /**
477528 * Format a line using the old system (aka without any javascript).
 529+ *
 530+ * @param $rc RecentChange
478531 */
479532 public function recentChangesLine( &$rc, $watched = false, $linenumber = null ) {
480533 global $wgLang, $wgRCShowChangedSize, $wgUser;
@@ -584,6 +637,8 @@
585638 }
586639 /**
587640 * Format a line for enhanced recentchange (aka with javascript and block of lines).
 641+ *
 642+ * @param $baseRC RecentChange
588643 */
589644 public function recentChangesLine( &$baseRC, $watched = false ) {
590645 global $wgLang, $wgUser;
@@ -1053,6 +1108,8 @@
10541109
10551110 /**
10561111 * Enhanced RC ungrouped line.
 1112+ *
 1113+ * @param $rcObj RecentChange
10571114 * @return String: a HTML formated line (generated using $r)
10581115 */
10591116 protected function recentChangesBlockLine( $rcObj ) {

Status & tagging log