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
Selenium: replace UserLoginPage with BlankPage where possible
[lhc/web/wiklou.git]
/
maintenance
/
populateInterwiki.php
diff --git
a/maintenance/populateInterwiki.php
b/maintenance/populateInterwiki.php
index
1b05e1e
..
a654a1f
100644
(file)
--- a/
maintenance/populateInterwiki.php
+++ b/
maintenance/populateInterwiki.php
@@
-24,6
+24,8
@@
* @author Katie Filbert < aude.wiki@gmail.com >
*/
* @author Katie Filbert < aude.wiki@gmail.com >
*/
+use MediaWiki\MediaWikiServices;
+
require_once __DIR__ . '/Maintenance.php';
class PopulateInterwiki extends Maintenance {
require_once __DIR__ . '/Maintenance.php';
class PopulateInterwiki extends Maintenance {
@@
-84,7
+86,7
@@
TEXT
$url = rtrim( $this->source, '?' ) . '?' . $url;
}
$url = rtrim( $this->source, '?' ) . '?' . $url;
}
- $json =
Http::
get( $url );
+ $json =
MediaWikiServices::getInstance()->getHttpRequestFactory()->
get( $url );
$data = json_decode( $json, true );
if ( is_array( $data ) ) {
$data = json_decode( $json, true );
if ( is_array( $data ) ) {
@@
-119,6
+121,7
@@
TEXT
}
}
}
}
+ $lookup = MediaWikiServices::getInstance()->getInterwikiLookup();
foreach ( $data as $d ) {
$prefix = $d['prefix'];
foreach ( $data as $d ) {
$prefix = $d['prefix'];
@@
-142,7
+145,7
@@
TEXT
);
}
);
}
-
Interwiki::
invalidateCache( $prefix );
+
$lookup->
invalidateCache( $prefix );
}
$this->output( "Interwiki links are populated.\n" );
}
$this->output( "Interwiki links are populated.\n" );