$wgMaxUploadSize may now be set to an array to specify the upload size limit per...
[lhc/web/wiklou.git] / maintenance / checkUsernames.php
index e1754d3..414d098 100644 (file)
  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
  * http://www.gnu.org/copyleft/gpl.html
  *
+ * @file
  * @ingroup Maintenance
  */
 
 
-require_once( dirname(__FILE__) . '/Maintenance.php' );
+require_once( dirname( __FILE__ ) . '/Maintenance.php' );
 
 class CheckUsernames extends Maintenance {
 
@@ -41,7 +42,7 @@ class CheckUsernames extends Maintenance {
                        __METHOD__
                );
 
-               while ( $row = $dbr->fetchObject( $res ) ) {
+               foreach ( $res as $row ) {
                        if ( ! User::isValidUserName( $row->user_name ) ) {
                                $this->error( sprintf( "%s: %6d: '%s'\n", wfWikiID(), $row->user_id, $row->user_name ) );
                                wfDebugLog( 'checkUsernames', $out );
@@ -51,4 +52,4 @@ class CheckUsernames extends Maintenance {
 }
 
 $maintClass = "CheckUsernames";
-require_once( "doMaintenance.php" );
+require_once( DO_MAINTENANCE );