checkUsernames: send output to stdout, don't include wikiid
authorKunal Mehta <legoktm@gmail.com>
Tue, 21 Apr 2015 06:26:49 +0000 (23:26 -0700)
committerKunal Mehta <legoktm@gmail.com>
Tue, 21 Apr 2015 06:26:49 +0000 (23:26 -0700)
In this case, we're actively looking for invalid usernames, so they're
not errors that should be sent to stderr, they're the expected output.

And wrappers like foreachwiki already include the wikiid so it's
redundant.

Change-Id: I61ea080647b6c327909fff1ba839177d3bc484d8

maintenance/checkUsernames.php

index 777c833..a64bc49 100644 (file)
@@ -56,7 +56,7 @@ class CheckUsernames extends Maintenance {
 
                        foreach ( $res as $row ) {
                                if ( !User::isValidUserName( $row->user_name ) ) {
-                                       $this->error( sprintf( "%s: %6d: '%s'\n", wfWikiID(), $row->user_id, $row->user_name ) );
+                                       $this->output( sprintf( "Found: %6d: '%s'\n", $row->user_id, $row->user_name ) );
                                        wfDebugLog( 'checkUsernames', $row->user_name );
                                }
                        }