From bb05461e45025f3c1af8acafbfc9cf042f4edf17 Mon Sep 17 00:00:00 2001 From: CosmicAlpha Date: Mon, 7 Oct 2024 12:43:59 +0800 Subject: [PATCH] Use RemoteWikiFactory --- includes/FormFactory/ManageWikiFormFactory.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/includes/FormFactory/ManageWikiFormFactory.php b/includes/FormFactory/ManageWikiFormFactory.php index 7582d4121..9c729fc46 100644 --- a/includes/FormFactory/ManageWikiFormFactory.php +++ b/includes/FormFactory/ManageWikiFormFactory.php @@ -8,7 +8,7 @@ use MediaWiki\HTMLForm\HTMLForm; use MediaWiki\MediaWikiServices; use MediaWiki\Output\OutputPage; -use Miraheze\CreateWiki\RemoteWiki; +use Miraheze\CreateWiki\Services\RemoteWikiFactory; use Miraheze\ManageWiki\Helpers\ManageWikiOOUIForm; use Miraheze\ManageWiki\ManageWiki; use UnexpectedValueException; @@ -21,7 +21,7 @@ public function getFormDescriptor( string $dbName, bool $ceMW, IContextSource $context, - RemoteWiki $wiki, + RemoteWikiFactory $remoteWiki, Config $config, string $special = '', string $filtered = '' @@ -31,12 +31,12 @@ public function getFormDescriptor( $context->getLanguage()->getDir() ); - return ManageWikiFormFactoryBuilder::buildDescriptor( $module, $dbName, $ceMW, $context, $wiki, $special, $filtered, $config ); + return ManageWikiFormFactoryBuilder::buildDescriptor( $module, $dbName, $ceMW, $context, $remoteWiki, $special, $filtered, $config ); } public function getForm( string $wiki, - RemoteWiki $remoteWiki, + RemoteWikiFactory $remoteWiki, IContextSource $context, Config $config, string $module, @@ -78,7 +78,7 @@ protected function submitForm( string $module, bool $ceMW, string $dbName, - RemoteWiki $wiki, + RemoteWikiFactory $remoteWiki, DBConnRef $dbw, Config $config, string $special = '', @@ -94,7 +94,7 @@ protected function submitForm( $form->getButtons(); $formData['reason'] = $form->getField( 'reason' )->loadDataFromRequest( $form->getRequest() ); - $mwReturn = ManageWikiFormFactoryBuilder::submissionHandler( $formData, $form, $module, $dbName, $context, $wiki, $dbw, $config, $special, $filtered ); + $mwReturn = ManageWikiFormFactoryBuilder::submissionHandler( $formData, $form, $module, $dbName, $context, $remoteWiki, $dbw, $config, $special, $filtered ); if ( !empty( $mwReturn ) ) { $errorOut = [];