Legoktm has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/155869

Change subject: Pass Config to ResourceLoader constructor in a few places
......................................................................

Pass Config to ResourceLoader constructor in a few places

Change-Id: I200e2c2dc922ae1fa5fa68d449403d0287e41786
---
M includes/resourceloader/ResourceLoaderContext.php
M load.php
M maintenance/cleanupRemovedModules.php
3 files changed, 7 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/69/155869/1

diff --git a/includes/resourceloader/ResourceLoaderContext.php 
b/includes/resourceloader/ResourceLoaderContext.php
index e79aadc..7af7b89 100644
--- a/includes/resourceloader/ResourceLoaderContext.php
+++ b/includes/resourceloader/ResourceLoaderContext.php
@@ -113,7 +113,9 @@
         * @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() ) );
        }
 
        /**
diff --git a/load.php b/load.php
index 1dd1a89..655f309 100644
--- a/load.php
+++ b/load.php
@@ -39,7 +39,9 @@
 }
 
 // Respond to resource loading request
-$resourceLoader = new ResourceLoader();
+$resourceLoader = new ResourceLoader(
+       ConfigFactory::getDefaultInstance()->makeConfig( 'main' )
+);
 $resourceLoader->respond( new ResourceLoaderContext( $resourceLoader, 
$wgRequest ) );
 
 wfProfileOut( 'load.php' );
diff --git a/maintenance/cleanupRemovedModules.php 
b/maintenance/cleanupRemovedModules.php
index cc8b024..e1d0ed6 100644
--- a/maintenance/cleanupRemovedModules.php
+++ b/maintenance/cleanupRemovedModules.php
@@ -47,7 +47,7 @@
 
        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 ) ) 
);

-- 
To view, visit https://gerrit.wikimedia.org/r/155869
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I200e2c2dc922ae1fa5fa68d449403d0287e41786
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Legoktm <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to