r96445 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r96444‎ | r96445 | r96446 >
Date:16:20, 7 September 2011
Author:nikerabbit
Status:ok (Comments)
Tags:
Comment:
RecentChange::notifyMove* have no callers. Everything uses ::notifyLog or ::newLogEntry.
Modified paths:
  • /trunk/phase3/includes/RecentChange.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/RecentChange.php
@@ -467,74 +467,9 @@
468468 'newSize' => $size
469469 );
470470 $rc->save();
471 - return $rc;
 471+ return $rc;
472472 }
473473
474 - # Makes an entry in the database corresponding to a rename
475 -
476 - /**
477 - * @param $timestamp
478 - * @param $oldTitle Title
479 - * @param $newTitle Title
480 - * @param $user User
481 - * @param $comment
482 - * @param $ip string
483 - * @param $overRedir bool
484 - * @return void
485 - */
486 - public static function notifyMove( $timestamp, &$oldTitle, &$newTitle, &$user, $comment, $ip='',
487 - $overRedir = false ) {
488 - global $wgRequest;
489 - if( !$ip ) {
490 - $ip = $wgRequest->getIP();
491 - if( !$ip ) $ip = '';
492 - }
493 -
494 - $rc = new RecentChange;
495 - $rc->mAttribs = array(
496 - 'rc_timestamp' => $timestamp,
497 - 'rc_cur_time' => $timestamp,
498 - 'rc_namespace' => $oldTitle->getNamespace(),
499 - 'rc_title' => $oldTitle->getDBkey(),
500 - 'rc_type' => $overRedir ? RC_MOVE_OVER_REDIRECT : RC_MOVE,
501 - 'rc_minor' => 0,
502 - 'rc_cur_id' => $oldTitle->getArticleID(),
503 - 'rc_user' => $user->getId(),
504 - 'rc_user_text' => $user->getName(),
505 - 'rc_comment' => $comment,
506 - 'rc_this_oldid' => 0,
507 - 'rc_last_oldid' => 0,
508 - 'rc_bot' => $user->isAllowed( 'bot' ) ? $wgRequest->getBool( 'bot' , true ) : 0,
509 - 'rc_moved_to_ns' => $newTitle->getNamespace(),
510 - 'rc_moved_to_title' => $newTitle->getDBkey(),
511 - 'rc_ip' => $ip,
512 - 'rc_new' => 0, # obsolete
513 - 'rc_patrolled' => 1,
514 - 'rc_old_len' => null,
515 - 'rc_new_len' => null,
516 - 'rc_deleted' => 0,
517 - 'rc_logid' => 0, # notifyMove not used anymore
518 - 'rc_log_type' => null,
519 - 'rc_log_action' => '',
520 - 'rc_params' => ''
521 - );
522 -
523 - $rc->mExtra = array(
524 - 'prefixedDBkey' => $oldTitle->getPrefixedDBkey(),
525 - 'lastTimestamp' => 0,
526 - 'prefixedMoveTo' => $newTitle->getPrefixedDBkey()
527 - );
528 - $rc->save();
529 - }
530 -
531 - public static function notifyMoveToNew( $timestamp, &$oldTitle, &$newTitle, &$user, $comment, $ip='' ) {
532 - RecentChange::notifyMove( $timestamp, $oldTitle, $newTitle, $user, $comment, $ip, false );
533 - }
534 -
535 - public static function notifyMoveOverRedirect( $timestamp, &$oldTitle, &$newTitle, &$user, $comment, $ip='' ) {
536 - RecentChange::notifyMove( $timestamp, $oldTitle, $newTitle, $user, $comment, $ip, true );
537 - }
538 -
539474 public static function notifyLog( $timestamp, &$title, &$user, $actionComment, $ip='', $type,
540475 $action, $target, $logComment, $params, $newId=0 )
541476 {

Comments

#Comment by Aaron Schulz (talk | contribs)   21:54, 8 September 2011

Woot!

Status & tagging log