https://www.mediawiki.org/wiki/Special:Code/MediaWiki/112843

Revision: 112843
Author:   aaron
Date:     2012-03-01 22:10:12 +0000 (Thu, 01 Mar 2012)
Log Message:
-----------
(bug 34873) List contributions of existing users that have invalid names

Modified Paths:
--------------
    trunk/phase3/includes/specials/SpecialContributions.php

Modified: trunk/phase3/includes/specials/SpecialContributions.php
===================================================================
--- trunk/phase3/includes/specials/SpecialContributions.php     2012-03-01 
22:05:13 UTC (rev 112842)
+++ trunk/phase3/includes/specials/SpecialContributions.php     2012-03-01 
22:10:12 UTC (rev 112843)
@@ -627,13 +627,14 @@
                        # @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'";


_______________________________________________
MediaWiki-CVS mailing list
MediaWiki-CVS@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs

Reply via email to