From: Aaron Schulz Date: Sun, 25 May 2008 18:20:33 +0000 (+0000) Subject: Move 'NewRevisionFromEditComplete' to proper place (bug 14251) X-Git-Tag: 1.31.0-rc.0~47387 X-Git-Url: https://git.cyclocoop.org//%22?a=commitdiff_plain;h=78af6a964d35c284026e982928be6fb3f2d8eed7;p=lhc%2Fweb%2Fwiklou.git Move 'NewRevisionFromEditComplete' to proper place (bug 14251) --- diff --git a/includes/Title.php b/includes/Title.php index fc98a0e82a..dfd4b95685 100644 --- a/includes/Title.php +++ b/includes/Title.php @@ -2612,6 +2612,7 @@ class Title { $nullRevId = $nullRevision->insertOn( $dbw ); $article = new Article( $nt ); + wfRunHooks( 'NewRevisionFromEditComplete', array($article, $nullRevision, false) ); # Change the name of the target page: $dbw->update( 'page', @@ -2625,8 +2626,6 @@ class Title { $fname ); $nt->resetArticleID( $oldid ); - - wfRunHooks( 'NewRevisionFromEditComplete', array($article, $nullRevision, false) ); # Recreate the redirect, this time in the other direction. if( $createRedirect || !$wgUser->isAllowed('suppressredirect') ) { @@ -2708,6 +2707,7 @@ class Title { $nullRevId = $nullRevision->insertOn( $dbw ); $article = new Article( $nt ); + wfRunHooks( 'NewRevisionFromEditComplete', array($article, $nullRevision, false) ); # Rename page entry $dbw->update( 'page', @@ -2721,8 +2721,6 @@ class Title { $fname ); $nt->resetArticleID( $oldid ); - - wfRunHooks( 'NewRevisionFromEditComplete', array($article, $nullRevision, false) ); if( $createRedirect || !$wgUser->isAllowed('suppressredirect') ) { # Insert redirect