Index: trunk/phase3/includes/RecentChange.php |
— | — | @@ -44,7 +44,16 @@ |
45 | 45 | */ |
46 | 46 | class RecentChange { |
47 | 47 | 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; |
49 | 58 | var $numberofWatchingusers = 0 ; # Dummy to prevent error message in SpecialRecentchangeslinked |
50 | 59 | |
51 | 60 | # Factory methods |
— | — | @@ -328,10 +337,27 @@ |
329 | 338 | return $dbw->affectedRows(); |
330 | 339 | } |
331 | 340 | |
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 | + */ |
333 | 360 | 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 ) { |
336 | 362 | if( !$ip ) { |
337 | 363 | $ip = wfGetIP(); |
338 | 364 | if( !$ip ) $ip = ''; |
— | — | @@ -380,10 +406,22 @@ |
381 | 407 | * Makes an entry in the database corresponding to page creation |
382 | 408 | * Note: the title object must be loaded with the new id using resetArticleID() |
383 | 409 | * @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 |
384 | 423 | */ |
385 | 424 | 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 ) { |
388 | 426 | if( !$ip ) { |
389 | 427 | $ip = wfGetIP(); |
390 | 428 | if( !$ip ) $ip = ''; |
— | — | @@ -429,8 +467,20 @@ |
430 | 468 | } |
431 | 469 | |
432 | 470 | # 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 ) { |
435 | 485 | global $wgRequest; |
436 | 486 | if( !$ip ) { |
437 | 487 | $ip = wfGetIP(); |
— | — | @@ -496,13 +546,29 @@ |
497 | 547 | return true; |
498 | 548 | } |
499 | 549 | |
| 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 | + */ |
500 | 565 | 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 ) { |
503 | 567 | global $wgRequest; |
504 | 568 | if( !$ip ) { |
505 | 569 | $ip = wfGetIP(); |
506 | | - if( !$ip ) $ip = ''; |
| 570 | + if( !$ip ) { |
| 571 | + $ip = ''; |
| 572 | + } |
507 | 573 | } |
508 | 574 | |
509 | 575 | $rc = new RecentChange; |