*Add and document ArticleRollbackComplete hook. Lets FlaggedRevs be able to autoflag...
authorAaron Schulz <aaron@users.mediawiki.org>
Tue, 30 Oct 2007 07:58:15 +0000 (07:58 +0000)
committerAaron Schulz <aaron@users.mediawiki.org>
Tue, 30 Oct 2007 07:58:15 +0000 (07:58 +0000)
docs/hooks.txt
includes/Article.php

index 4866a30..559f2c4 100644 (file)
@@ -296,6 +296,11 @@ $protect: boolean whether it was a protect or an unprotect
 $reason: Reason for protect
 $moveonly: boolean whether it was for move only or not
 
+'ArticleRollbackComplete': after an article rollback is completed
+$article: the article that was edited
+$user: the user who did the rollback
+$revision: the revision the page was reverted back to
+
 'ArticleSave': before an article is saved
 $article: the article (object) being saved
 $user: the user (object) saving the article
index 1533ae9..cf9072c 100644 (file)
@@ -2289,6 +2289,8 @@ class Article {
                        $flags |= EDIT_FORCE_BOT;
                $this->doEdit( $target->getText(), $summary, $flags );
 
+               wfRunHooks( 'ArticleRollbackComplete', array( $this, $wgUser, $target ) );
+
                $resultDetails = array(
                        'summary' => $summary,
                        'current' => $current,