dépôts
/
lhc
/
web
/
wiklou.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge "Remove parameter 'options' from hook 'SkinEditSectionLinks'"
[lhc/web/wiklou.git]
/
maintenance
/
importSiteScripts.php
diff --git
a/maintenance/importSiteScripts.php
b/maintenance/importSiteScripts.php
index
7fdb355
..
1d4b496
100644
(file)
--- a/
maintenance/importSiteScripts.php
+++ b/
maintenance/importSiteScripts.php
@@
-21,6
+21,8
@@
* @ingroup Maintenance
*/
* @ingroup Maintenance
*/
+use MediaWiki\MediaWikiServices;
+
require_once __DIR__ . '/Maintenance.php';
/**
require_once __DIR__ . '/Maintenance.php';
/**
@@
-64,7
+66,8
@@
class ImportSiteScripts extends Maintenance {
$url = wfAppendQuery( $baseUrl, [
'action' => 'raw',
'title' => "MediaWiki:{$page}" ] );
$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() );
$wikiPage = WikiPage::factory( $title );
$content = ContentHandler::makeContent( $text, $wikiPage->getTitle() );
@@
-86,7
+89,8
@@
class ImportSiteScripts extends Maintenance {
while ( true ) {
$url = wfAppendQuery( $baseUrl, $data );
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;
$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;
require_once RUN_MAINTENANCE_IF_MAIN;