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 "Override momentjs's digit transform logic with MW's"
[lhc/web/wiklou.git]
/
maintenance
/
fixUserRegistration.php
diff --git
a/maintenance/fixUserRegistration.php
b/maintenance/fixUserRegistration.php
index
d09760b
..
f4674cb
100644
(file)
--- a/
maintenance/fixUserRegistration.php
+++ b/
maintenance/fixUserRegistration.php
@@
-32,7
+32,7
@@
require_once __DIR__ . '/Maintenance.php';
class FixUserRegistration extends Maintenance {
public function __construct() {
parent::__construct();
class FixUserRegistration extends Maintenance {
public function __construct() {
parent::__construct();
- $this->
mDescription = "Fix the user_registration field"
;
+ $this->
addDescription( 'Fix the user_registration field' )
;
$this->setBatchSize( 1000 );
}
$this->setBatchSize( 1000 );
}
@@
-45,15
+45,15
@@
class FixUserRegistration extends Maintenance {
$res = $dbw->select(
'user',
'user_id',
$res = $dbw->select(
'user',
'user_id',
- array(
+ [
'user_id > ' . $dbw->addQuotes( $lastId ),
'user_registration IS NULL'
'user_id > ' . $dbw->addQuotes( $lastId ),
'user_registration IS NULL'
-
)
,
+
]
,
__METHOD__,
__METHOD__,
- array(
+ [
'LIMIT' => $this->mBatchSize,
'ORDER BY' => 'user_id',
'LIMIT' => $this->mBatchSize,
'ORDER BY' => 'user_id',
- )
+ ]
);
foreach ( $res as $row ) {
$id = $row->user_id;
);
foreach ( $res as $row ) {
$id = $row->user_id;
@@
-62,15
+62,15
@@
class FixUserRegistration extends Maintenance {
$timestamp = $dbw->selectField(
'revision',
'MIN(rev_timestamp)',
$timestamp = $dbw->selectField(
'revision',
'MIN(rev_timestamp)',
-
array( 'rev_user' => $id )
,
+
[ 'rev_user' => $id ]
,
__METHOD__
);
// Update
if ( $timestamp !== null ) {
$dbw->update(
'user',
__METHOD__
);
// Update
if ( $timestamp !== null ) {
$dbw->update(
'user',
-
array( 'user_registration' => $timestamp )
,
-
array( 'user_id' => $id )
,
+
[ 'user_registration' => $timestamp ]
,
+
[ 'user_id' => $id ]
,
__METHOD__
);
$user = User::newFromId( $id );
__METHOD__
);
$user = User::newFromId( $id );