From 57b571b81df94e0e93e256e97fbd6f8ae61b08df Mon Sep 17 00:00:00 2001 From: Aaron Schulz Date: Thu, 1 Mar 2012 22:10:12 +0000 Subject: [PATCH] (bug 34873) List contributions of existing users that have invalid names --- includes/specials/SpecialContributions.php | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/includes/specials/SpecialContributions.php b/includes/specials/SpecialContributions.php index 35709d27ab..9f08cc5a7d 100644 --- a/includes/specials/SpecialContributions.php +++ b/includes/specials/SpecialContributions.php @@ -627,13 +627,14 @@ class ContribsPager extends ReverseChronologicalPager { # @todo FIXME: Other groups may have 'bot' rights $join_conds['user_groups'] = array( 'LEFT JOIN', "ug_user = rev_user AND ug_group = 'bot'" ); } else { - if ( IP::isIPAddress( $this->target ) ) { + $uid = User::idFromName( $this->target ); + if ( $uid ) { + $condition['rev_user'] = $uid; + $index = 'user_timestamp'; + } else { $condition['rev_user_text'] = $this->target; $index = 'usertext_timestamp'; - } else { - $condition['rev_user'] = User::idFromName( $this->target ); - $index = 'user_timestamp'; - } + } } if ( $this->deletedOnly ) { $condition[] = "rev_deleted != '0'"; -- 2.20.1