From 21bab11cdc9917570a584dbd4d1502b4c12fef45 Mon Sep 17 00:00:00 2001 From: Aaron Schulz Date: Sun, 26 Apr 2009 01:00:36 +0000 Subject: [PATCH] Tweak for bug 17275: reduce autoreview transaction time by moving hook after RC stuff --- includes/Article.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/includes/Article.php b/includes/Article.php index eaa4bc2d21..4c21c7bd79 100644 --- a/includes/Article.php +++ b/includes/Article.php @@ -1680,7 +1680,6 @@ class Article { $dbw->rollback(); } else { global $wgUseRCPatrol; - wfRunHooks( 'NewRevisionFromEditComplete', array($this, $revision, $baseRevId, $user) ); # Update recentchanges if( !( $flags & EDIT_SUPPRESS_RC ) ) { # Mark as patrolled if the user can do so @@ -1695,6 +1694,8 @@ class Article { PatrolLog::record( $rc, true ); } } + # Notify extensions of a new edit + wfRunHooks( 'NewRevisionFromEditComplete', array(&$this, $revision, $baseRevId, $user) ); $user->incEditCount(); $dbw->commit(); } @@ -1761,7 +1762,6 @@ class Article { # Update the page record with revision data $this->updateRevisionOn( $dbw, $revision, 0 ); - wfRunHooks( 'NewRevisionFromEditComplete', array($this, $revision, false, $user) ); # Update recentchanges if( !( $flags & EDIT_SUPPRESS_RC ) ) { global $wgUseRCPatrol, $wgUseNPPatrol; @@ -1775,6 +1775,8 @@ class Article { PatrolLog::record( $rc, true ); } } + # Notify extensions of a new page edit + wfRunHooks( 'NewRevisionFromEditComplete', array(&$this, $revision, false, $user) ); $user->incEditCount(); $dbw->commit(); -- 2.20.1