resourceloader: Pass a Config to the ResourceLoader constructor
Instead of relying on the default being main, which is deprecated. Change-Id: I200e2c2dc922ae1fa5fa68d449403d0287e41786
This commit is contained in:
parent
e1c1832588
commit
1d9d9b4d76
3 changed files with 7 additions and 3 deletions
|
|
@ -113,7 +113,9 @@ class ResourceLoaderContext {
|
|||
* @return ResourceLoaderContext
|
||||
*/
|
||||
public static function newDummyContext() {
|
||||
return new self( new ResourceLoader, new FauxRequest( array() ) );
|
||||
return new self( new ResourceLoader(
|
||||
ConfigFactory::getDefaultInstance()->makeConfig( 'main' )
|
||||
), new FauxRequest( array() ) );
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
4
load.php
4
load.php
|
|
@ -39,7 +39,9 @@ if ( !$wgRequest->checkUrlExtension() ) {
|
|||
}
|
||||
|
||||
// Respond to resource loading request
|
||||
$resourceLoader = new ResourceLoader();
|
||||
$resourceLoader = new ResourceLoader(
|
||||
ConfigFactory::getDefaultInstance()->makeConfig( 'main' )
|
||||
);
|
||||
$resourceLoader->respond( new ResourceLoaderContext( $resourceLoader, $wgRequest ) );
|
||||
|
||||
wfProfileOut( 'load.php' );
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@ class CleanupRemovedModules extends Maintenance {
|
|||
|
||||
public function execute() {
|
||||
$dbw = wfGetDB( DB_MASTER );
|
||||
$rl = new ResourceLoader();
|
||||
$rl = new ResourceLoader( ConfigFactory::getDefaultInstance()->makeConfig( 'main' ) );
|
||||
$moduleNames = $rl->getModuleNames();
|
||||
$moduleList = implode( ', ', array_map( array( $dbw, 'addQuotes' ), $moduleNames ) );
|
||||
$limit = max( 1, intval( $this->getOption( 'batchsize', 500 ) ) );
|
||||
|
|
|
|||
Loading…
Reference in a new issue