X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=maintenance%2FimportSiteScripts.php;h=1d4b496e4c9ddd9381905e983c177dada8d79c4c;hb=a3b4288eacd34869b13f59782b73c9ddb75e3523;hp=e60e776328badaa64b6eb07a75cbcd33d1d1f29d;hpb=3f59cb9f3a53ad28f8a95fe299c5de6abd24b453;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;