Change-Id: I4f2fc07b0365183efb431a828d40c557b691b18c
$revisionId = $revision->insertOn( $dbw );
// Update page_latest and friends to reflect the new revision
$revisionId = $revision->insertOn( $dbw );
// Update page_latest and friends to reflect the new revision
- $this->updateRevisionOn( $dbw, $revision, null, $oldIsRedirect );
+ if ( !$this->updateRevisionOn( $dbw, $revision, null, $oldIsRedirect ) ) {
+ $dbw->rollback( __METHOD__ );
+ throw new MWException( "Failed to update page row to use new revision." );
+ }
Hooks::run( 'NewRevisionFromEditComplete',
array( $this, $revision, $baseRevId, $user ) );
Hooks::run( 'NewRevisionFromEditComplete',
array( $this, $revision, $baseRevId, $user ) );