Skip to content

Commit

Permalink
Replace
Browse files Browse the repository at this point in the history
  • Loading branch information
Universal-Omega authored Oct 10, 2024
1 parent 47cda95 commit ad76069
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions includes/Api/ApiModifyServer.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

use ApiBase;
use MediaWiki\MediaWikiServices;
use Miraheze\CreateWiki\RemoteWiki;
use Miraheze\ManageWiki\ManageWiki;
use Wikimedia\ParamValidator\ParamValidator;

Expand Down Expand Up @@ -44,8 +43,8 @@ public function execute() {
}

private function setServer( string $wiki, string $server ) {
$createWikiHookRunner = MediaWikiServices::getInstance()->get( 'CreateWikiHookRunner' );
$remoteWiki = new RemoteWiki( $wiki, $createWikiHookRunner );
$remoteWikiFactory = MediaWikiServices::getInstance()->get( 'RemoteWikiFactory' );
$remoteWiki = $remoteWikiFactory->newInstance( $wiki );
$remoteWiki->setServerName( $server );
$remoteWiki->commit();
}
Expand Down

0 comments on commit ad76069

Please sign in to comment.