r112843 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r112842‎ | r112843 | r112844 >
Date:22:10, 1 March 2012
Author:aaron
Status:ok
Tags:
Comment:
(bug 34873) List contributions of existing users that have invalid names
Modified paths:
  • /trunk/phase3/includes/specials/SpecialContributions.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/specials/SpecialContributions.php
@@ -627,13 +627,14 @@
628628 # @todo FIXME: Other groups may have 'bot' rights
629629 $join_conds['user_groups'] = array( 'LEFT JOIN', "ug_user = rev_user AND ug_group = 'bot'" );
630630 } else {
631 - if ( IP::isIPAddress( $this->target ) ) {
 631+ $uid = User::idFromName( $this->target );
 632+ if ( $uid ) {
 633+ $condition['rev_user'] = $uid;
 634+ $index = 'user_timestamp';
 635+ } else {
632636 $condition['rev_user_text'] = $this->target;
633637 $index = 'usertext_timestamp';
634 - } else {
635 - $condition['rev_user'] = User::idFromName( $this->target );
636 - $index = 'user_timestamp';
637 - }
 638+ }
638639 }
639640 if ( $this->deletedOnly ) {
640641 $condition[] = "rev_deleted != '0'";

Follow-up revisions

RevisionCommit summaryAuthorDate
r112844MFT r112843aaron22:11, 1 March 2012

Status & tagging log