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
Remove deprecated class SquidUpdate
[lhc/web/wiklou.git]
/
maintenance
/
migrateUserGroup.php
diff --git
a/maintenance/migrateUserGroup.php
b/maintenance/migrateUserGroup.php
index
81c2353
..
bf8d071
100644
(file)
--- a/
maintenance/migrateUserGroup.php
+++ b/
maintenance/migrateUserGroup.php
@@
-63,7
+63,7
@@
class MigrateUserGroup extends Maintenance {
$dbw->update( 'user_groups',
[ 'ug_group' => $newGroup ],
[ 'ug_group' => $oldGroup,
$dbw->update( 'user_groups',
[ 'ug_group' => $newGroup ],
[ 'ug_group' => $oldGroup,
- "ug_user BETWEEN
$blockStart AND $blockEnd"
],
+ "ug_user BETWEEN
" . (int)$blockStart . " AND " . (int)$blockEnd
],
__METHOD__,
[ 'IGNORE' ]
);
__METHOD__,
[ 'IGNORE' ]
);
@@
-74,7
+74,7
@@
class MigrateUserGroup extends Maintenance {
// user/group is UNIQUE.
$dbw->delete( 'user_groups',
[ 'ug_group' => $oldGroup,
// user/group is UNIQUE.
$dbw->delete( 'user_groups',
[ 'ug_group' => $oldGroup,
- "ug_user BETWEEN
$blockStart AND $blockEnd"
],
+ "ug_user BETWEEN
" . (int)$blockStart . " AND " . (int)$blockEnd
],
__METHOD__
);
$affected += $dbw->affectedRows();
__METHOD__
);
$affected += $dbw->affectedRows();
@@
-86,7
+86,7
@@
class MigrateUserGroup extends Maintenance {
// were in the new group and not in the group.
$res = $dbw->select( 'user_groups', 'ug_user',
[ 'ug_group' => $newGroup,
// were in the new group and not in the group.
$res = $dbw->select( 'user_groups', 'ug_user',
[ 'ug_group' => $newGroup,
- "ug_user BETWEEN
$blockStart AND $blockEnd"
],
+ "ug_user BETWEEN
" . (int)$blockStart . " AND " . (int)$blockEnd
],
__METHOD__
);
if ( $res !== false ) {
__METHOD__
);
if ( $res !== false ) {
@@
-100,11
+100,10
@@
class MigrateUserGroup extends Maintenance {
$count += $affected;
$blockStart += $batchSize;
$blockEnd += $batchSize;
$count += $affected;
$blockStart += $batchSize;
$blockEnd += $batchSize;
- wfWaitForSlaves();
}
$this->output( "Done! $count users in group '$oldGroup' are now in '$newGroup' instead.\n" );
}
}
}
$this->output( "Done! $count users in group '$oldGroup' are now in '$newGroup' instead.\n" );
}
}
-$maintClass =
"MigrateUserGroup"
;
+$maintClass =
MigrateUserGroup::class
;
require_once RUN_MAINTENANCE_IF_MAIN;
require_once RUN_MAINTENANCE_IF_MAIN;