dépôts
/
lhc
/
web
/
wiklou.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge "tests: Replace PHPUnit's loose assertEquals(null) with assertNull()"
[lhc/web/wiklou.git]
/
maintenance
/
fixUserRegistration.php
diff --git
a/maintenance/fixUserRegistration.php
b/maintenance/fixUserRegistration.php
index
37fd44f
..
e1b1682
100644
(file)
--- a/
maintenance/fixUserRegistration.php
+++ b/
maintenance/fixUserRegistration.php
@@
-51,7
+51,7
@@
class FixUserRegistration extends Maintenance {
],
__METHOD__,
[
],
__METHOD__,
[
- 'LIMIT' => $this->
mBatchSize
,
+ 'LIMIT' => $this->
getBatchSize()
,
'ORDER BY' => 'user_id',
]
);
'ORDER BY' => 'user_id',
]
);
@@
-59,11
+59,15
@@
class FixUserRegistration extends Maintenance {
$id = $row->user_id;
$lastId = $id;
// Get first edit time
$id = $row->user_id;
$lastId = $id;
// Get first edit time
+ $actorQuery = ActorMigration::newMigration()
+ ->getWhere( $dbw, 'rev_user', User::newFromId( $id ) );
$timestamp = $dbw->selectField(
$timestamp = $dbw->selectField(
-
'revision'
,
+
[ 'revision' ] + $actorQuery['tables']
,
'MIN(rev_timestamp)',
'MIN(rev_timestamp)',
- [ 'rev_user' => $id ],
- __METHOD__
+ $actorQuery['conds'],
+ __METHOD__,
+ [],
+ $actorQuery['joins']
);
// Update
if ( $timestamp !== null ) {
);
// Update
if ( $timestamp !== null ) {
@@
-83,9
+87,9
@@
class FixUserRegistration extends Maintenance {
$this->output( "Waiting for replica DBs..." );
wfWaitForSlaves();
$this->output( " done.\n" );
$this->output( "Waiting for replica DBs..." );
wfWaitForSlaves();
$this->output( " done.\n" );
- } while ( $res->numRows() >= $this->
mBatchSize
);
+ } while ( $res->numRows() >= $this->
getBatchSize()
);
}
}
}
}
-$maintClass =
"FixUserRegistration"
;
+$maintClass =
FixUserRegistration::class
;
require_once RUN_MAINTENANCE_IF_MAIN;
require_once RUN_MAINTENANCE_IF_MAIN;