Use namespaced classes

Changes to the use statements done automatically via script
Addition of missing use statement done manually

Change-Id: If99e2c98969579306c7fdc626658bec5d6e26b5d
This commit is contained in:
Umherirrender 2024-06-10 22:00:10 +02:00
parent 12182dbd18
commit 0da96a7000
4 changed files with 10 additions and 10 deletions

View file

@ -5,8 +5,8 @@ namespace MediaWiki\Extension\Thanks\Api;
use ApiBase; use ApiBase;
use ApiMain; use ApiMain;
use DatabaseLogEntry; use DatabaseLogEntry;
use EchoDiscussionParser;
use LogEntry; use LogEntry;
use MediaWiki\Extension\Notifications\DiscussionParser;
use MediaWiki\Extension\Notifications\Model\Event; use MediaWiki\Extension\Notifications\Model\Event;
use MediaWiki\Extension\Thanks\Storage\Exceptions\InvalidLogType; use MediaWiki\Extension\Thanks\Storage\Exceptions\InvalidLogType;
use MediaWiki\Extension\Thanks\Storage\Exceptions\LogDeleted; use MediaWiki\Extension\Thanks\Storage\Exceptions\LogDeleted;
@ -93,7 +93,7 @@ class ApiCoreThank extends ApiThank {
} }
if ( $type === 'rev' ) { if ( $type === 'rev' ) {
$revision = $this->getRevisionFromId( $id ); $revision = $this->getRevisionFromId( $id );
$excerpt = EchoDiscussionParser::getEditExcerpt( $revision, $this->getLanguage() ); $excerpt = DiscussionParser::getEditExcerpt( $revision, $this->getLanguage() );
$title = $this->getTitleFromRevision( $revision ); $title = $this->getTitleFromRevision( $revision );
$this->dieOnUserBlockedFromTitle( $user, $title ); $this->dieOnUserBlockedFromTitle( $user, $title );

View file

@ -2,12 +2,12 @@
namespace MediaWiki\Extension\Thanks; namespace MediaWiki\Extension\Thanks;
use EchoAttributeManager;
use EchoUserLocator;
use ExtensionRegistry; use ExtensionRegistry;
use MediaWiki\Extension\Notifications\AttributeManager;
use MediaWiki\Extension\Notifications\Hooks\BeforeCreateEchoEventHook; use MediaWiki\Extension\Notifications\Hooks\BeforeCreateEchoEventHook;
use MediaWiki\Extension\Notifications\Hooks\EchoGetBundleRulesHook; use MediaWiki\Extension\Notifications\Hooks\EchoGetBundleRulesHook;
use MediaWiki\Extension\Notifications\Model\Event; use MediaWiki\Extension\Notifications\Model\Event;
use MediaWiki\Extension\Notifications\UserLocator;
/** /**
* Hooks for Thanks extension * Hooks for Thanks extension
@ -43,9 +43,9 @@ class EchoHooks implements BeforeCreateEchoEventHook, EchoGetBundleRulesHook {
'web' => true, 'web' => true,
'expandable' => true, 'expandable' => true,
], ],
EchoAttributeManager::ATTR_LOCATORS => [ AttributeManager::ATTR_LOCATORS => [
[ [
[ EchoUserLocator::class, 'locateFromEventExtra' ], [ UserLocator::class, 'locateFromEventExtra' ],
[ 'thanked-user-id' ] [ 'thanked-user-id' ]
], ],
], ],
@ -61,9 +61,9 @@ class EchoHooks implements BeforeCreateEchoEventHook, EchoGetBundleRulesHook {
'web' => true, 'web' => true,
'expandable' => true, 'expandable' => true,
], ],
EchoAttributeManager::ATTR_LOCATORS => [ AttributeManager::ATTR_LOCATORS => [
[ [
[ EchoUserLocator::class, 'locateFromEventExtra' ], [ UserLocator::class, 'locateFromEventExtra' ],
[ 'thanked-user-id' ] [ 'thanked-user-id' ]
], ],
], ],

View file

@ -22,13 +22,13 @@ use MediaWiki\Context\RequestContext;
use MediaWiki\Diff\Hook\DifferenceEngineViewHeaderHook; use MediaWiki\Diff\Hook\DifferenceEngineViewHeaderHook;
use MediaWiki\Diff\Hook\DiffToolsHook; use MediaWiki\Diff\Hook\DiffToolsHook;
use MediaWiki\Extension\Thanks\Api\ApiFlowThank; use MediaWiki\Extension\Thanks\Api\ApiFlowThank;
use MediaWiki\Hook\BeforePageDisplayHook;
use MediaWiki\Hook\GetLogTypesOnUserHook; use MediaWiki\Hook\GetLogTypesOnUserHook;
use MediaWiki\Hook\HistoryToolsHook; use MediaWiki\Hook\HistoryToolsHook;
use MediaWiki\Hook\LogEventsListLineEndingHook; use MediaWiki\Hook\LogEventsListLineEndingHook;
use MediaWiki\Hook\PageHistoryBeforeListHook; use MediaWiki\Hook\PageHistoryBeforeListHook;
use MediaWiki\Html\Html; use MediaWiki\Html\Html;
use MediaWiki\Linker\LinkTarget; use MediaWiki\Linker\LinkTarget;
use MediaWiki\Output\Hook\BeforePageDisplayHook;
use MediaWiki\Output\OutputPage; use MediaWiki\Output\OutputPage;
use MediaWiki\Permissions\PermissionManager; use MediaWiki\Permissions\PermissionManager;
use MediaWiki\Revision\RevisionLookup; use MediaWiki\Revision\RevisionLookup;

View file

@ -3,9 +3,9 @@
namespace MediaWiki\Extension\Thanks; namespace MediaWiki\Extension\Thanks;
use LogFormatter; use LogFormatter;
use MediaWiki\Message\Message;
use MediaWiki\Title\Title; use MediaWiki\Title\Title;
use MediaWiki\User\User; use MediaWiki\User\User;
use Message;
/** /**
* This class formats log entries for thanks * This class formats log entries for thanks