X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2FMovePage.php;h=2ad315811c9e10a01edf960d1bdaa26b807c7b29;hb=908d5115623ec9e6c40599c5cee4555a7335423f;hp=ec44b6eb699c4b2351abc9f32dcb60d6e918cbfb;hpb=5410cfccce9b0b84bc909506c9b66d3f27d6dba7;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/MovePage.php b/includes/MovePage.php index ec44b6eb69..2ad315811c 100644 --- a/includes/MovePage.php +++ b/includes/MovePage.php @@ -523,15 +523,6 @@ class MovePage { $newpage = WikiPage::factory( $nt ); - # Save a null revision in the page's history notifying of the move - $nullRevision = Revision::newNullRevision( $dbw, $oldid, $comment, true, $user ); - if ( !is_object( $nullRevision ) ) { - throw new MWException( 'No valid null revision produced in ' . __METHOD__ ); - } - - $nullRevId = $nullRevision->insertOn( $dbw ); - $logEntry->setAssociatedRevId( $nullRevId ); - # Change the name of the target page: $dbw->update( 'page', /* SET */ [ @@ -542,6 +533,15 @@ class MovePage { __METHOD__ ); + # Save a null revision in the page's history notifying of the move + $nullRevision = Revision::newNullRevision( $dbw, $oldid, $comment, true, $user ); + if ( !is_object( $nullRevision ) ) { + throw new MWException( 'No valid null revision produced in ' . __METHOD__ ); + } + + $nullRevId = $nullRevision->insertOn( $dbw ); + $logEntry->setAssociatedRevId( $nullRevId ); + if ( !$redirectContent ) { // Clean up the old title *before* reset article id - T47348 WikiPage::onArticleDelete( $this->oldTitle );