From: Aaron Schulz Date: Thu, 1 Mar 2012 22:10:12 +0000 (+0000) Subject: (bug 34873) List contributions of existing users that have invalid names X-Git-Tag: 1.31.0-rc.0~24436 X-Git-Url: http://git.cyclocoop.org/ecrire?a=commitdiff_plain;h=57b571b81df94e0e93e256e97fbd6f8ae61b08df;p=lhc%2Fweb%2Fwiklou.git (bug 34873) List contributions of existing users that have invalid names --- 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'";