* @author Katie Filbert < aude.wiki@gmail.com >
*/
+use MediaWiki\MediaWikiServices;
+
require_once __DIR__ . '/Maintenance.php';
class PopulateInterwiki extends Maintenance {
$url = rtrim( $this->source, '?' ) . '?' . $url;
}
- $json = Http::get( $url );
+ $json = MediaWikiServices::getInstance()->getHttpRequestFactory()->get( $url );
$data = json_decode( $json, true );
if ( is_array( $data ) ) {
}
}
+ $lookup = MediaWikiServices::getInstance()->getInterwikiLookup();
foreach ( $data as $d ) {
$prefix = $d['prefix'];
);
}
- Interwiki::invalidateCache( $prefix );
+ $lookup->invalidateCache( $prefix );
}
$this->output( "Interwiki links are populated.\n" );