From: Brad Jorsch Date: Tue, 27 Feb 2018 21:08:02 +0000 (-0500) Subject: Add a missing check of $wgActorTableSchemaMigrationStage X-Git-Tag: 1.31.0-rc.0~497 X-Git-Url: http://git.cyclocoop.org/%7B%24admin_url%7Dmes_infos.php?a=commitdiff_plain;h=73781d381679d7ab4fdf700b73cb0bdbd68bd6b1;p=lhc%2Fweb%2Fwiklou.git Add a missing check of $wgActorTableSchemaMigrationStage We shouldn't be trying to update the table when it's MIGRATION_OLD. Bug: T188437 Change-Id: Id5aae5eaafc36bf7e65009e67fe91619fb1df295 --- diff --git a/includes/user/User.php b/includes/user/User.php index babb571c94..3102cfcf10 100644 --- a/includes/user/User.php +++ b/includes/user/User.php @@ -4237,6 +4237,8 @@ class User implements IDBAccessObject, UserIdentity { $dbw = wfGetDB( DB_MASTER ); $dbw->doAtomicSection( __METHOD__, function ( $dbw, $fname ) use ( $newTouched ) { + global $wgActorTableSchemaMigrationStage; + $dbw->update( 'user', [ /* SET */ 'user_name' => $this->mName, @@ -4263,12 +4265,14 @@ class User implements IDBAccessObject, UserIdentity { ); } - $dbw->update( - 'actor', - [ 'actor_name' => $this->mName ], - [ 'actor_user' => $this->mId ], - $fname - ); + if ( $wgActorTableSchemaMigrationStage > MIGRATION_OLD ) { + $dbw->update( + 'actor', + [ 'actor_name' => $this->mName ], + [ 'actor_user' => $this->mId ], + $fname + ); + } } ); $this->mTouched = $newTouched;