Merge "build: Enable jscs jsDoc rule 'checkParamNames' and make pass"
[lhc/web/wiklou.git] / maintenance / fixUserRegistration.php
index 0120f35..40e0915 100644 (file)
@@ -46,13 +46,13 @@ class FixUserRegistration extends Maintenance {
                                'user',
                                'user_id',
                                array(
-                                       'user_id >' . $dbw->addQuotes( $lastId ),
+                                       'user_id > ' . $dbw->addQuotes( $lastId ),
                                        'user_registration IS NULL'
                                ),
                                __METHOD__,
                                array(
                                        'LIMIT' => $this->mBatchSize,
-                                       'ORDER BY user_id ASC',
+                                       'ORDER BY' => 'user_id',
                                )
                        );
                        foreach ( $res as $row ) {
@@ -66,7 +66,7 @@ class FixUserRegistration extends Maintenance {
                                        __METHOD__
                                );
                                // Update
-                               if ( $timestamp !== false ) {
+                               if ( $timestamp !== null ) {
                                        $dbw->update(
                                                'user',
                                                array( 'user_registration' => $timestamp ),
@@ -83,7 +83,7 @@ class FixUserRegistration extends Maintenance {
                        $this->output( "Waiting for slaves..." );
                        wfWaitForSlaves();
                        $this->output( " done.\n" );
-               } while ( $res->numRows() );
+               } while ( $res->numRows() >= $this->mBatchSize );
        }
 }