Nikerabbit has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/254822

Change subject: Remove EditFilterMerged BC code
......................................................................

Remove EditFilterMerged BC code

This extension already requires 1.23+

Change-Id: Ie56d701c1663a280372caaf71560dfdca7500619
---
M AbuseFilter.hooks.php
M AbuseFilter.php
2 files changed, 1 insertion(+), 33 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/AbuseFilter 
refs/changes/22/254822/1

diff --git a/AbuseFilter.hooks.php b/AbuseFilter.hooks.php
index afa370f..4758042 100755
--- a/AbuseFilter.hooks.php
+++ b/AbuseFilter.hooks.php
@@ -60,33 +60,6 @@
        }
 
        /**
-        * 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)
         *
         * @param IContextSource $context the context of the edit
diff --git a/AbuseFilter.php b/AbuseFilter.php
index 33f5c0d..0f79fe1 100644
--- a/AbuseFilter.php
+++ b/AbuseFilter.php
@@ -79,12 +79,7 @@
 $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';

-- 
To view, visit https://gerrit.wikimedia.org/r/254822
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie56d701c1663a280372caaf71560dfdca7500619
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/AbuseFilter
Gerrit-Branch: master
Gerrit-Owner: Nikerabbit <niklas.laxst...@gmail.com>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to