diff --git a/extension.json b/extension.json index 621643cd8..49e72e7a9 100644 --- a/extension.json +++ b/extension.json @@ -11,7 +11,7 @@ "license-name": "GPL-2.0-or-later", "type": "antispam", "requires": { - "MediaWiki": ">= 1.33.0" + "MediaWiki": ">= 1.34.0" }, "AvailableRights": [ "abusefilter-modify", diff --git a/includes/AbuseFilter.php b/includes/AbuseFilter.php index 1e05c0ba6..b01a6aac2 100644 --- a/includes/AbuseFilter.php +++ b/includes/AbuseFilter.php @@ -1,5 +1,6 @@ inContentLanguage()->text(); - $block = new Block(); + $block = new DatabaseBlock(); $block->setTarget( $target ); $block->setBlocker( $filterUser ); $block->mReason = $reason; diff --git a/includes/Views/AbuseFilterViewRevert.php b/includes/Views/AbuseFilterViewRevert.php index f1c036252..f4aadf6ee 100644 --- a/includes/Views/AbuseFilterViewRevert.php +++ b/includes/Views/AbuseFilterViewRevert.php @@ -1,5 +1,6 @@ getBy() === AbuseFilter::getFilterUser()->getId() ) ) { // Not blocked by abuse filter return false; diff --git a/tests/phpunit/AbuseFilterConsequencesTest.php b/tests/phpunit/AbuseFilterConsequencesTest.php index 016adb248..1dd4eb555 100644 --- a/tests/phpunit/AbuseFilterConsequencesTest.php +++ b/tests/phpunit/AbuseFilterConsequencesTest.php @@ -1,5 +1,6 @@ addToDatabase(); $user->addGroup( 'sysop' ); - $block = Block::newFromTarget( $user ); + $block = DatabaseBlock::newFromTarget( $user ); if ( $block ) { $block->delete(); } diff --git a/tests/phpunit/AbuseFilterTest.php b/tests/phpunit/AbuseFilterTest.php index e3f3647a0..6db1d2da0 100644 --- a/tests/phpunit/AbuseFilterTest.php +++ b/tests/phpunit/AbuseFilterTest.php @@ -1,5 +1,6 @@ setTarget( $user ); $block->setBlocker( 'UTSysop' ); $block->mReason = 'Testing AbuseFilter variable user_blocked';