*Add and document ArticleRollbackComplete hook. Lets FlaggedRevs be able to autoflag rollbacks when possible.
This commit is contained in:
parent
fcf74715b9
commit
f4e4edaf3d
2 changed files with 7 additions and 0 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Reference in a new issue