From 4bac912eb3e710a93621a153997f8171eeff338a Mon Sep 17 00:00:00 2001 From: Umherirrender Date: Sun, 20 Oct 2024 11:55:49 +0200 Subject: [PATCH] Use namespaced classes Changes to the use statements done automatically via script Addition of missing use statement done manually Change-Id: Ifa450560a587a9d51de91b6f5a855f82d4fd8fe4 --- includes/ApiSpamBlacklist.php | 4 ++-- includes/BaseBlacklist.php | 2 +- includes/Hooks.php | 8 ++++---- includes/SpamBlacklist.php | 2 +- maintenance/cleanup.php | 3 +++ 5 files changed, 11 insertions(+), 8 deletions(-) diff --git a/includes/ApiSpamBlacklist.php b/includes/ApiSpamBlacklist.php index f89fda5b..05ae8398 100644 --- a/includes/ApiSpamBlacklist.php +++ b/includes/ApiSpamBlacklist.php @@ -24,8 +24,8 @@ namespace MediaWiki\Extension\SpamBlacklist; -use ApiBase; -use ApiResult; +use MediaWiki\Api\ApiBase; +use MediaWiki\Api\ApiResult; use Wikimedia\ParamValidator\ParamValidator; /** diff --git a/includes/BaseBlacklist.php b/includes/BaseBlacklist.php index 1fdcf1ae..4e88dd76 100644 --- a/includes/BaseBlacklist.php +++ b/includes/BaseBlacklist.php @@ -3,11 +3,11 @@ namespace MediaWiki\Extension\SpamBlacklist; use InvalidArgumentException; +use MediaWiki\Content\TextContent; use MediaWiki\MediaWikiServices; use MediaWiki\Revision\SlotRecord; use MediaWiki\Title\Title; use MediaWiki\User\User; -use TextContent; /** * Base class for different kinds of blacklists diff --git a/includes/Hooks.php b/includes/Hooks.php index 26df4260..9c906ce6 100644 --- a/includes/Hooks.php +++ b/includes/Hooks.php @@ -2,9 +2,9 @@ namespace MediaWiki\Extension\SpamBlacklist; -use ApiMessage; -use Content; use LogicException; +use MediaWiki\Api\ApiMessage; +use MediaWiki\Content\Content; use MediaWiki\Content\IContentHandlerFactory; use MediaWiki\Content\Renderer\ContentRenderer; use MediaWiki\Context\IContextSource; @@ -15,6 +15,7 @@ use MediaWiki\Hook\EditFilterMergedContentHook; use MediaWiki\Hook\UploadVerifyUploadHook; use MediaWiki\Html\Html; use MediaWiki\Message\Message; +use MediaWiki\Parser\ParserOptions; use MediaWiki\Parser\ParserOutput; use MediaWiki\Permissions\PermissionManager; use MediaWiki\Revision\RevisionRecord; @@ -26,10 +27,9 @@ use MediaWiki\Storage\PageEditStash; use MediaWiki\User\Hook\UserCanSendEmailHook; use MediaWiki\User\User; use MediaWiki\User\UserIdentity; -use MessageSpecifier; -use ParserOptions; use UploadBase; use Wikimedia\Assert\PreconditionException; +use Wikimedia\Message\MessageSpecifier; use WikiPage; /** diff --git a/includes/SpamBlacklist.php b/includes/SpamBlacklist.php index b3b19720..ecedf2ac 100644 --- a/includes/SpamBlacklist.php +++ b/includes/SpamBlacklist.php @@ -2,13 +2,13 @@ namespace MediaWiki\Extension\SpamBlacklist; -use ExtensionRegistry; use LogPage; use ManualLogEntry; use MediaWiki\CheckUser\Hooks as CUHooks; use MediaWiki\Context\RequestContext; use MediaWiki\ExternalLinks\ExternalLinksLookup; use MediaWiki\MediaWikiServices; +use MediaWiki\Registration\ExtensionRegistry; use MediaWiki\Title\Title; use MediaWiki\User\User; use Wikimedia\AtEase\AtEase; diff --git a/maintenance/cleanup.php b/maintenance/cleanup.php index 162922d2..e48cf3e2 100644 --- a/maintenance/cleanup.php +++ b/maintenance/cleanup.php @@ -6,7 +6,10 @@ * If all revisions contain spam, blanks the page */ +use MediaWiki\Content\ContentHandler; +use MediaWiki\Content\TextContent; use MediaWiki\Extension\SpamBlacklist\BaseBlacklist; +use MediaWiki\Maintenance\Maintenance; use MediaWiki\MediaWikiServices; use MediaWiki\Page\WikiPageFactory; use MediaWiki\Revision\RevisionLookup;