Merge "Don't filter undos coming in via the "APIEditBeforeSave" hook"

This commit is contained in:
jenkins-bot 2016-03-18 14:18:31 +00:00 committed by Gerrit Code Review
commit db61abb01c

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