Fix ORDER BY in fixUserRegistration.php
authorKevin Israel <pleasestand@live.com>
Sun, 29 Mar 2015 18:07:46 +0000 (14:07 -0400)
committerKevin Israel <pleasestand@live.com>
Sun, 29 Mar 2015 18:13:47 +0000 (14:13 -0400)
Non-boolean options for select() must be provided as key-value pairs. If
provided as numbered elements, they will not end up in the generated query.

Follows-up ea406e42cd41.

Change-Id: I0364618b6a805c353cdc19a60f157df33519d87a

maintenance/fixUserRegistration.php

index 43f4b6c..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 ) {