*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
|
$reason: Reason for protect
|
||||||
$moveonly: boolean whether it was for move only or not
|
$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
|
'ArticleSave': before an article is saved
|
||||||
$article: the article (object) being saved
|
$article: the article (object) being saved
|
||||||
$user: the user (object) saving the article
|
$user: the user (object) saving the article
|
||||||
|
|
|
||||||
|
|
@ -2289,6 +2289,8 @@ class Article {
|
||||||
$flags |= EDIT_FORCE_BOT;
|
$flags |= EDIT_FORCE_BOT;
|
||||||
$this->doEdit( $target->getText(), $summary, $flags );
|
$this->doEdit( $target->getText(), $summary, $flags );
|
||||||
|
|
||||||
|
wfRunHooks( 'ArticleRollbackComplete', array( $this, $wgUser, $target ) );
|
||||||
|
|
||||||
$resultDetails = array(
|
$resultDetails = array(
|
||||||
'summary' => $summary,
|
'summary' => $summary,
|
||||||
'current' => $current,
|
'current' => $current,
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue