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:
Marius Hoch 2016-03-17 20:44:43 +01:00 committed by Alex Monk
parent 93f28e613c
commit b2ae8af263

View file

@ -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();