mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/AbuseFilter.git
synced 2024-11-12 00:38:23 +00:00
Remove EditFilterMerged BC code
This extension already requires 1.23+ Change-Id: Ie56d701c1663a280372caaf71560dfdca7500619
This commit is contained in:
parent
6354f6047a
commit
df6cde026c
|
@ -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)
|
||||
*
|
||||
|
|
|
@ -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';
|
||||
|
|
Loading…
Reference in a new issue