r85781 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r85780‎ | r85781 | r85782 >
Date:12:47, 11 April 2011
Author:reedy
Status:ok
Tags:
Comment:
Code comments, few braces
Modified paths:
  • /trunk/phase3/includes/RecentChange.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/RecentChange.php
@@ -44,7 +44,16 @@
4545 */
4646 class RecentChange {
4747 var $mAttribs = array(), $mExtra = array();
48 - var $mTitle = false, $mMovedToTitle = false;
 48+
 49+ /**
 50+ * @var Title
 51+ */
 52+ var $mTitle = false;
 53+
 54+ /**
 55+ * @var Title
 56+ */
 57+ var $mMovedToTitle = false;
4958 var $numberofWatchingusers = 0 ; # Dummy to prevent error message in SpecialRecentchangeslinked
5059
5160 # Factory methods
@@ -328,10 +337,27 @@
329338 return $dbw->affectedRows();
330339 }
331340
332 - # Makes an entry in the database corresponding to an edit
 341+ /**
 342+ * Makes an entry in the database corresponding to an edit
 343+ *
 344+ * @static
 345+ * @param $timestamp
 346+ * @param $title Title
 347+ * @param $minor
 348+ * @param $user User
 349+ * @param $comment
 350+ * @param $oldId
 351+ * @param $lastTimestamp
 352+ * @param $bot
 353+ * @param $ip string
 354+ * @param $oldSize int
 355+ * @param $newSize int
 356+ * @param $newId int
 357+ * @param $patrol int
 358+ * @return RecentChange
 359+ */
333360 public static function notifyEdit( $timestamp, &$title, $minor, &$user, $comment, $oldId,
334 - $lastTimestamp, $bot, $ip='', $oldSize=0, $newSize=0, $newId=0, $patrol=0 )
335 - {
 361+ $lastTimestamp, $bot, $ip='', $oldSize=0, $newSize=0, $newId=0, $patrol=0 ) {
336362 if( !$ip ) {
337363 $ip = wfGetIP();
338364 if( !$ip ) $ip = '';
@@ -380,10 +406,22 @@
381407 * Makes an entry in the database corresponding to page creation
382408 * Note: the title object must be loaded with the new id using resetArticleID()
383409 * @todo Document parameters and return
 410+ *
 411+ * @static
 412+ * @param $timestamp
 413+ * @param $title Title
 414+ * @param $minor
 415+ * @param $user User
 416+ * @param $comment
 417+ * @param $bot
 418+ * @param $ip string
 419+ * @param $size int
 420+ * @param $newId int
 421+ * @param $patrol int
 422+ * @return RecentChange
384423 */
385424 public static function notifyNew( $timestamp, &$title, $minor, &$user, $comment, $bot,
386 - $ip='', $size=0, $newId=0, $patrol=0 )
387 - {
 425+ $ip='', $size=0, $newId=0, $patrol=0 ) {
388426 if( !$ip ) {
389427 $ip = wfGetIP();
390428 if( !$ip ) $ip = '';
@@ -429,8 +467,20 @@
430468 }
431469
432470 # Makes an entry in the database corresponding to a rename
433 - public static function notifyMove( $timestamp, &$oldTitle, &$newTitle, &$user, $comment, $ip='', $overRedir = false )
434 - {
 471+
 472+ /**
 473+ * @static
 474+ * @param $timestamp
 475+ * @param $oldTitle Title
 476+ * @param $newTitle Title
 477+ * @param $user User
 478+ * @param $comment
 479+ * @param $ip string
 480+ * @param $overRedir bool
 481+ * @return void
 482+ */
 483+ public static function notifyMove( $timestamp, &$oldTitle, &$newTitle, &$user, $comment, $ip='',
 484+ $overRedir = false ) {
435485 global $wgRequest;
436486 if( !$ip ) {
437487 $ip = wfGetIP();
@@ -496,13 +546,29 @@
497547 return true;
498548 }
499549
 550+ /**
 551+ * @static
 552+ * @param $timestamp
 553+ * @param $title Title
 554+ * @param $user User
 555+ * @param $actionComment
 556+ * @param $ip string
 557+ * @param $type
 558+ * @param $action
 559+ * @param $target Title
 560+ * @param $logComment
 561+ * @param $params
 562+ * @param $newId int
 563+ * @return RecentChange
 564+ */
500565 public static function newLogEntry( $timestamp, &$title, &$user, $actionComment, $ip='',
501 - $type, $action, $target, $logComment, $params, $newId=0 )
502 - {
 566+ $type, $action, $target, $logComment, $params, $newId=0 ) {
503567 global $wgRequest;
504568 if( !$ip ) {
505569 $ip = wfGetIP();
506 - if( !$ip ) $ip = '';
 570+ if( !$ip ) {
 571+ $ip = '';
 572+ }
507573 }
508574
509575 $rc = new RecentChange;

Sign-offs

UserFlagDate
Krinkleinspected13:32, 11 April 2011

Status & tagging log