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 "Don't fallback from uk to ru"
[lhc/web/wiklou.git]
/
maintenance
/
migrateUserGroup.php
diff --git
a/maintenance/migrateUserGroup.php
b/maintenance/migrateUserGroup.php
index
df6665a
..
396be1d
100644
(file)
--- a/
maintenance/migrateUserGroup.php
+++ b/
maintenance/migrateUserGroup.php
@@
-43,9
+43,9
@@
class MigrateUserGroup extends Maintenance {
$newGroup = $this->getArg( 1 );
$dbw = $this->getDB( DB_MASTER );
$start = $dbw->selectField( 'user_groups', 'MIN(ug_user)',
$newGroup = $this->getArg( 1 );
$dbw = $this->getDB( DB_MASTER );
$start = $dbw->selectField( 'user_groups', 'MIN(ug_user)',
-
array( 'ug_group' => $oldGroup )
, __FUNCTION__ );
+
[ 'ug_group' => $oldGroup ]
, __FUNCTION__ );
$end = $dbw->selectField( 'user_groups', 'MAX(ug_user)',
$end = $dbw->selectField( 'user_groups', 'MAX(ug_user)',
-
array( 'ug_group' => $oldGroup )
, __FUNCTION__ );
+
[ 'ug_group' => $oldGroup ]
, __FUNCTION__ );
if ( $start === null ) {
$this->error( "Nothing to do - no users in the '$oldGroup' group", true );
}
if ( $start === null ) {
$this->error( "Nothing to do - no users in the '$oldGroup' group", true );
}
@@
-60,11
+60,11
@@
class MigrateUserGroup extends Maintenance {
$this->beginTransaction( $dbw, __METHOD__ );
$dbw->update( 'user_groups',
$this->beginTransaction( $dbw, __METHOD__ );
$dbw->update( 'user_groups',
-
array( 'ug_group' => $newGroup )
,
-
array(
'ug_group' => $oldGroup,
- "ug_user BETWEEN $blockStart AND $blockEnd"
)
,
+
[ 'ug_group' => $newGroup ]
,
+
[
'ug_group' => $oldGroup,
+ "ug_user BETWEEN $blockStart AND $blockEnd"
]
,
__METHOD__,
__METHOD__,
- array( 'IGNORE' )
+ [ 'IGNORE' ]
);
$affected += $dbw->affectedRows();
// Delete rows that the UPDATE operation above had to ignore.
);
$affected += $dbw->affectedRows();
// Delete rows that the UPDATE operation above had to ignore.
@@
-72,8
+72,8
@@
class MigrateUserGroup extends Maintenance {
// Updating the row for the old group membership failed since
// user/group is UNIQUE.
$dbw->delete( 'user_groups',
// Updating the row for the old group membership failed since
// user/group is UNIQUE.
$dbw->delete( 'user_groups',
-
array(
'ug_group' => $oldGroup,
- "ug_user BETWEEN $blockStart AND $blockEnd"
)
,
+
[
'ug_group' => $oldGroup,
+ "ug_user BETWEEN $blockStart AND $blockEnd"
]
,
__METHOD__
);
$affected += $dbw->affectedRows();
__METHOD__
);
$affected += $dbw->affectedRows();
@@
-84,8
+84,8
@@
class MigrateUserGroup extends Maintenance {
// XXX: This also invalidates cache of unaffected users that
// were in the new group and not in the group.
$res = $dbw->select( 'user_groups', 'ug_user',
// XXX: This also invalidates cache of unaffected users that
// were in the new group and not in the group.
$res = $dbw->select( 'user_groups', 'ug_user',
-
array(
'ug_group' => $newGroup,
- "ug_user BETWEEN $blockStart AND $blockEnd"
)
,
+
[
'ug_group' => $newGroup,
+ "ug_user BETWEEN $blockStart AND $blockEnd"
]
,
__METHOD__
);
if ( $res !== false ) {
__METHOD__
);
if ( $res !== false ) {