Remove EditFilterMerged BC code

This extension already requires 1.23+

Change-Id: Ie56d701c1663a280372caaf71560dfdca7500619
This commit is contained in:
Niklas Laxström 2015-11-23 10:57:02 +01:00
parent 6354f6047a
commit df6cde026c
2 changed files with 1 additions and 33 deletions

View file

@ -59,33 +59,6 @@ class AbuseFilterHooks {
return $status->isOK();
}
/**
* Entry points for MediaWiki hook 'EditFilterMerged' (MW 1.20 and earlier)
*
* @param $editor EditPage instance (object)
* @param $text string Content of the edit box
* @param &$error string Error message to return
* @param $summary string Edit summary for page
* @return bool
*/
public static function onEditFilterMerged( $editor, $text, &$error, $summary ) {
$context = $editor->mArticle->getContext();
$status = Status::newGood();
$minoredit = $editor->minoredit;
// poor man's PST, see bug 20310
$text = str_replace( "\r\n", "\n", $text );
$continue = self::filterEdit( $context, null, $text, $status, $summary, $minoredit );
if ( !$status->isOK() ) {
$error = $status->getWikiText();
}
return $continue;
}
/**
* Entry points for MediaWiki hook 'EditFilterMergedContent' (MW 1.21 and later)
*

View file

@ -79,12 +79,7 @@ $wgAutoloadClasses['ApiAbuseFilterCheckMatch'] = "$dir/api/ApiAbuseFilterCheckMa
$wgAPIModules['abusefiltercheckmatch'] = 'ApiAbuseFilterCheckMatch';
if ( defined( 'MW_SUPPORTS_CONTENTHANDLER' ) ) {
$wgHooks['EditFilterMergedContent'][] = 'AbuseFilterHooks::onEditFilterMergedContent';
} else {
$wgHooks['EditFilterMerged'][] = 'AbuseFilterHooks::onEditFilterMerged';
}
$wgHooks['EditFilterMergedContent'][] = 'AbuseFilterHooks::onEditFilterMergedContent';
$wgHooks['GetAutoPromoteGroups'][] = 'AbuseFilterHooks::onGetAutoPromoteGroups';
$wgHooks['AbortMove'][] = 'AbuseFilterHooks::onAbortMove';
$wgHooks['MovePageCheckPermissions'][] = 'AbuseFilterHooks::onMovePageCheckPermissions';