Index: trunk/phase3/includes/specials/SpecialContributions.php |
— | — | @@ -627,13 +627,14 @@ |
628 | 628 | # @todo FIXME: Other groups may have 'bot' rights |
629 | 629 | $join_conds['user_groups'] = array( 'LEFT JOIN', "ug_user = rev_user AND ug_group = 'bot'" ); |
630 | 630 | } 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 { |
632 | 636 | $condition['rev_user_text'] = $this->target; |
633 | 637 | $index = 'usertext_timestamp'; |
634 | | - } else { |
635 | | - $condition['rev_user'] = User::idFromName( $this->target ); |
636 | | - $index = 'user_timestamp'; |
637 | | - } |
| 638 | + } |
638 | 639 | } |
639 | 640 | if ( $this->deletedOnly ) { |
640 | 641 | $condition[] = "rev_deleted != '0'"; |