Merge "parser: Document PPFrame_DOM::expand() as taking DOMNodeList"
[lhc/web/wiklou.git] / maintenance / includes / MigrateActors.php
index d9c2072..1b35a20 100644 (file)
@@ -51,9 +51,9 @@ class MigrateActors extends LoggedUpdateMaintenance {
        }
 
        protected function doDBUpdates() {
-               global $wgActorTableSchemaMigrationStage;
+               $actorTableSchemaMigrationStage = $this->getConfig()->get( 'ActorTableSchemaMigrationStage' );
 
-               if ( !( $wgActorTableSchemaMigrationStage & SCHEMA_COMPAT_WRITE_NEW ) ) {
+               if ( !( $actorTableSchemaMigrationStage & SCHEMA_COMPAT_WRITE_NEW ) ) {
                        $this->output(
                                "...cannot update while \$wgActorTableSchemaMigrationStage lacks SCHEMA_COMPAT_WRITE_NEW\n"
                        );
@@ -478,14 +478,14 @@ class MigrateActors extends LoggedUpdateMaintenance {
                        [ 'LIMIT' => 1 ]
                );
                if ( $anyBad ) {
-                       $this->output( "... Deleting bogus rows due to T21552\n" );
+                       $this->output( "... Deleting bogus rows due to T215525\n" );
                        $dbw->delete(
                                'log_search',
                                [ 'ls_field' => 'target_author_actor', 'ls_value' => '' ],
                                __METHOD__
                        );
                        $ct = $dbw->affectedRows();
-                       $this->output( "... Deleted $ct bogus row(s) from T21552\n" );
+                       $this->output( "... Deleted $ct bogus row(s) from T215525\n" );
                        wfWaitForSlaves();
                }
 
@@ -504,7 +504,7 @@ class MigrateActors extends LoggedUpdateMaintenance {
                                        'ORDER BY' => $primaryKey,
                                        'LIMIT' => $this->mBatchSize,
                                ],
-                               [ 'actor' => [ 'LEFT JOIN', 'ls_value = ' . $dbw->buildStringCast( 'actor_user' ) ] ]
+                               [ 'actor' => [ 'LEFT JOIN', 'actor_user = ' . $dbw->buildIntegerCast( 'ls_value' ) ] ]
                        );
                        if ( !$res->numRows() ) {
                                break;