(bug 23375) Added ogv, oga, spx as extensions for ogg files. Patch by Derk-Jan Hartman.
[lhc/web/wiklou.git] / maintenance / checkUsernames.php
index e530a3b..85a3d15 100644 (file)
@@ -3,12 +3,27 @@
  * This script verifies that database usernames are actually valid.
  * An existing usernames can become invalid if User::isValidUserName()
  * is altered or if we change the $wgMaxNameChars
- * @file
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * http://www.gnu.org/copyleft/gpl.html
+ *
  * @ingroup Maintenance
  */
 
 
-require_once( "Maintenance.php" );
+require_once( dirname(__FILE__) . '/Maintenance.php' );
 
 class CheckUsernames extends Maintenance {
 
@@ -26,7 +41,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 );
@@ -36,4 +51,4 @@ class CheckUsernames extends Maintenance {
 }
 
 $maintClass = "CheckUsernames";
-require_once( "doMaintenance.php" );
+require_once( DO_MAINTENANCE );