From: Aaron Schulz Date: Tue, 30 Oct 2007 07:58:15 +0000 (+0000) Subject: *Add and document ArticleRollbackComplete hook. Lets FlaggedRevs be able to autoflag... X-Git-Tag: 1.31.0-rc.0~51058 X-Git-Url: https://git.cyclocoop.org/%242?a=commitdiff_plain;h=f4e4edaf3d5fac35a5e84f58f78e4d5ba62eacd8;p=lhc%2Fweb%2Fwiklou.git *Add and document ArticleRollbackComplete hook. Lets FlaggedRevs be able to autoflag rollbacks when possible. --- diff --git a/docs/hooks.txt b/docs/hooks.txt index 4866a30a11..559f2c46da 100644 --- a/docs/hooks.txt +++ b/docs/hooks.txt @@ -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 diff --git a/includes/Article.php b/includes/Article.php index 1533ae9331..cf9072cf33 100644 --- a/includes/Article.php +++ b/includes/Article.php @@ -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,