From 78af6a964d35c284026e982928be6fb3f2d8eed7 Mon Sep 17 00:00:00 2001 From: Aaron Schulz Date: Sun, 25 May 2008 18:20:33 +0000 Subject: [PATCH] Move 'NewRevisionFromEditComplete' to proper place (bug 14251) --- includes/Title.php | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) 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 -- 2.20.1