X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=maintenance%2FimportSiteScripts.php;h=1d4b496e4c9ddd9381905e983c177dada8d79c4c;hb=f1f9006707a2324505a9d97b32f07bf5a28aa37e;hp=7fdb355a91aa88cb22f71b6d15fe7fd4f33056c8;hpb=a5be382adfdad4678eec18413c6a118cb3284daf;p=lhc%2Fweb%2Fwiklou.git diff --git a/maintenance/importSiteScripts.php b/maintenance/importSiteScripts.php index 7fdb355a91..1d4b496e4c 100644 --- a/maintenance/importSiteScripts.php +++ b/maintenance/importSiteScripts.php @@ -21,6 +21,8 @@ * @ingroup Maintenance */ +use MediaWiki\MediaWikiServices; + require_once __DIR__ . '/Maintenance.php'; /** @@ -64,7 +66,8 @@ class ImportSiteScripts extends Maintenance { $url = wfAppendQuery( $baseUrl, [ 'action' => 'raw', 'title' => "MediaWiki:{$page}" ] ); - $text = Http::get( $url, [], __METHOD__ ); + $text = MediaWikiServices::getInstance()->getHttpRequestFactory()-> + get( $url, [], __METHOD__ ); $wikiPage = WikiPage::factory( $title ); $content = ContentHandler::makeContent( $text, $wikiPage->getTitle() ); @@ -86,7 +89,8 @@ class ImportSiteScripts extends Maintenance { while ( true ) { $url = wfAppendQuery( $baseUrl, $data ); - $strResult = Http::get( $url, [], __METHOD__ ); + $strResult = MediaWikiServices::getInstance()->getHttpRequestFactory()-> + get( $url, [], __METHOD__ ); $result = FormatJson::decode( $strResult, true ); $page = null; @@ -114,5 +118,5 @@ class ImportSiteScripts extends Maintenance { } } -$maintClass = 'ImportSiteScripts'; +$maintClass = ImportSiteScripts::class; require_once RUN_MAINTENANCE_IF_MAIN;