mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/AbuseFilter.git
synced 2024-11-24 14:13:54 +00:00
Merge "Don't filter undos coming in via the "APIEditBeforeSave" hook"
This commit is contained in:
commit
db61abb01c
|
@ -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