X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=maintenance%2FimportSiteScripts.php;h=1d4b496e4c9ddd9381905e983c177dada8d79c4c;hb=7225215a0d2b5074959d7ea7b1029ad28ea53643;hp=e60e776328badaa64b6eb07a75cbcd33d1d1f29d;hpb=12ff4dec05ff8bb1a1910bf6745155b93e1912b5;p=lhc%2Fweb%2Fwiklou.git diff --git a/maintenance/importSiteScripts.php b/maintenance/importSiteScripts.php index e60e776328..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;