reverted r49889 - breaks patrol mark functions (and a real fix was used anyway)
authorAaron Schulz <aaron@users.mediawiki.org>
Mon, 15 Jun 2009 20:08:50 +0000 (20:08 +0000)
committerAaron Schulz <aaron@users.mediawiki.org>
Mon, 15 Jun 2009 20:08:50 +0000 (20:08 +0000)
includes/Article.php

index 9b626b6..21b402f 100644 (file)
@@ -1705,6 +1705,7 @@ 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
@@ -1719,8 +1720,6 @@ class Article {
                                                        PatrolLog::record( $rc, true );
                                                }
                                        }
-                                       # Notify extensions of a new edit
-                                       wfRunHooks( 'NewRevisionFromEditComplete', array(&$this, $revision, $baseRevId, $user) );
                                        $user->incEditCount();
                                        $dbw->commit();
                                }
@@ -1787,6 +1786,7 @@ 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;
@@ -1800,8 +1800,6 @@ class Article {
                                        PatrolLog::record( $rc, true );
                                }
                        }
-                       # Notify extensions of a new page edit
-                       wfRunHooks( 'NewRevisionFromEditComplete', array(&$this, $revision, false, $user) );
                        $user->incEditCount();
                        $dbw->commit();