X-Git-Url: http://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2FMergeHistory.php;h=1a950c5f5e1f74262aa8e0fe0b730c2c324acf87;hb=748c5eae2fd5d897c94c48771161c259941a7488;hp=6bd4471723d32d843dcc6d51a0e52e94f081255a;hpb=de374ac282c66e0141ea5c9979130e80a69b9f28;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/MergeHistory.php b/includes/MergeHistory.php index 6bd4471723..1a950c5f5e 100644 --- a/includes/MergeHistory.php +++ b/includes/MergeHistory.php @@ -178,7 +178,8 @@ class MergeHistory { } // Check mergehistory permission - if ( !$user->isAllowed( 'mergehistory' ) ) { + $permissionManager = MediaWikiServices::getInstance()->getPermissionManager(); + if ( !$permissionManager->userHasRight( $user, 'mergehistory' ) ) { // User doesn't have the right to merge histories $status->fatal( 'mergehistory-fail-permission' ); } @@ -272,6 +273,18 @@ class MergeHistory { return $status; } + // Update denormalized revactor_page too + $this->dbw->update( + 'revision_actor_temp', + [ 'revactor_page' => $this->dest->getArticleID() ], + [ + 'revactor_page' => $this->source->getArticleID(), + // Slightly hacky, but should work given the values assigned in this class + str_replace( 'rev_timestamp', 'revactor_timestamp', $this->timeWhere ) + ], + __METHOD__ + ); + // Make the source page a redirect if no revisions are left $haveRevisions = $this->dbw->lockForUpdate( 'revision',