tableName calls moved inside fieldInfoMulti and removed call that existed only for...
[lhc/web/wiklou.git] / maintenance / fixUserRegistration.php
index 15c00b3..d330535 100644 (file)
@@ -21,7 +21,7 @@
  * @ingroup Maintenance
  */
 
-require_once( "Maintenance.php" );
+require_once( dirname(__FILE__) . '/Maintenance.php' );
 
 class FixUserRegistration extends Maintenance {
        public function __construct() {
@@ -35,7 +35,7 @@ class FixUserRegistration extends Maintenance {
 
                // Get user IDs which need fixing
                $res = $dbr->select( 'user', 'user_id', 'user_registration IS NULL', __METHOD__ );
-               while ( $row = $dbr->fetchObject( $res ) ) {
+               foreach ( $res as $row ) {
                        $id = $row->user_id;
                        // Get first edit time
                        $timestamp = $dbr->selectField( 'revision', 'MIN(rev_timestamp)', array( 'rev_user' => $id ), __METHOD__ );