mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/AbuseFilter.git
synced 2024-11-24 06:03:49 +00:00
Don't filter undos coming in via the "APIEditBeforeSave" hook
For consistency with other hooks. Bug: T126861 Change-Id: I087276495c6f5f7fb01855aee3798516869e1a3e
This commit is contained in:
parent
93f28e613c
commit
b2ae8af263
|
@ -20,6 +20,12 @@ class AbuseFilterHooks {
|
|||
* @return bool
|
||||
*/
|
||||
public static function onAPIEditBeforeSave( $editPage, $text, &$result ) {
|
||||
if ( $editPage->undidRev > 0 ) {
|
||||
// This hook is also (unlike the non-API hooks) being run on undo,
|
||||
// but we don't want to filter in that case. T126861
|
||||
return true;
|
||||
}
|
||||
|
||||
$context = $editPage->mArticle->getContext();
|
||||
|
||||
$status = Status::newGood();
|
||||
|
|
Loading…
Reference in a new issue