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 "Fix some issues with HTMLSelectAndOtherField default and validation"
[lhc/web/wiklou.git]
/
maintenance
/
reassignEdits.php
diff --git
a/maintenance/reassignEdits.php
b/maintenance/reassignEdits.php
index
4458901
..
98025d1
100644
(file)
--- a/
maintenance/reassignEdits.php
+++ b/
maintenance/reassignEdits.php
@@
-20,7
+20,7
@@
* @file
* @ingroup Maintenance
* @author Rob Church <robchur@gmail.com>
* @file
* @ingroup Maintenance
* @author Rob Church <robchur@gmail.com>
- * @license G
NU General Public Licence 2.0 or
later
+ * @license G
PL-2.0-or-
later
*/
use Wikimedia\Rdbms\IDatabase;
*/
use Wikimedia\Rdbms\IDatabase;
@@
-136,20
+136,19
@@
class ReassignEdits extends Maintenance {
if ( $total ) {
# Reassign edits
$this->output( "\nReassigning current edits..." );
if ( $total ) {
# Reassign edits
$this->output( "\nReassigning current edits..." );
- if ( $wgActorTableSchemaMigrationStage
< MIGRATION_NEW
) {
+ if ( $wgActorTableSchemaMigrationStage
& SCHEMA_COMPAT_WRITE_OLD
) {
$dbw->update(
'revision',
[
'rev_user' => $to->getId(),
$dbw->update(
'revision',
[
'rev_user' => $to->getId(),
- 'rev_user_text' =>
- $wgActorTableSchemaMigrationStage <= MIGRATION_WRITE_BOTH ? $to->getName() : ''
+ 'rev_user_text' => $to->getName(),
],
$from->isLoggedIn()
? [ 'rev_user' => $from->getId() ] : [ 'rev_user_text' => $from->getName() ],
__METHOD__
);
}
],
$from->isLoggedIn()
? [ 'rev_user' => $from->getId() ] : [ 'rev_user_text' => $from->getName() ],
__METHOD__
);
}
- if ( $wgActorTableSchemaMigrationStage
> MIGRATION_OLD
) {
+ if ( $wgActorTableSchemaMigrationStage
& SCHEMA_COMPAT_WRITE_NEW
) {
$dbw->update(
'revision_actor_temp',
[ 'revactor_actor' => $to->getActorId( $dbw ) ],
$dbw->update(
'revision_actor_temp',
[ 'revactor_actor' => $to->getActorId( $dbw ) ],
@@
-179,7
+178,7
@@
class ReassignEdits extends Maintenance {
}
/**
}
/**
- * Return user specifications
+ * Return user specifications
for an UPDATE
* i.e. user => id, user_text => text
*
* @param IDatabase $dbw Database handle
* i.e. user => id, user_text => text
*
* @param IDatabase $dbw Database handle
@@
-193,13
+192,13
@@
class ReassignEdits extends Maintenance {
global $wgActorTableSchemaMigrationStage;
$ret = [];
global $wgActorTableSchemaMigrationStage;
$ret = [];
- if ( $wgActorTableSchemaMigrationStage
< MIGRATION_NEW
) {
+ if ( $wgActorTableSchemaMigrationStage
& SCHEMA_COMPAT_WRITE_OLD
) {
$ret += [
$idfield => $user->getId(),
$ret += [
$idfield => $user->getId(),
- $utfield => $
wgActorTableSchemaMigrationStage <= MIGRATION_WRITE_BOTH ? $user->getName() : ''
,
+ $utfield => $
user->getName()
,
];
}
];
}
- if ( $wgActorTableSchemaMigrationStage
> MIGRATION_OLD
) {
+ if ( $wgActorTableSchemaMigrationStage
& SCHEMA_COMPAT_WRITE_NEW
) {
$ret += [ $acfield => $user->getActorId( $dbw ) ];
}
return $ret;
$ret += [ $acfield => $user->getActorId( $dbw ) ];
}
return $ret;