File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed
Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -88,7 +88,7 @@ public function loadConfiguration()
8888 foreach ($ config [$ type ] as $ name => $ wlConfig ) {
8989 $ wlConfig = Helpers::merge ($ wlConfig , $ config [$ type . 'Defaults ' ]);
9090 $ this ->addWebLoader ($ builder , $ type . ucfirst ($ name ), $ wlConfig );
91- $ loaderFactoryTempPaths [strtolower ($ name )] = $ wlConfig ['tempPath ' ];
91+ $ loaderFactoryTempPaths [$ type ][ strtolower ($ name )] = $ wlConfig ['tempPath ' ];
9292
9393 if (!is_dir ($ wlConfig ['tempDir ' ]) || !is_writable ($ wlConfig ['tempDir ' ])) {
9494 throw new CompilationException (sprintf ("You must create a writable directory '%s' " , $ wlConfig ['tempDir ' ]));
Original file line number Diff line number Diff line change @@ -43,7 +43,7 @@ public function createCssLoader($name)
4343 {
4444 /** @var Compiler $compiler */
4545 $ compiler = $ this ->serviceLocator ->getService ($ this ->extensionName . '.css ' . ucfirst ($ name ) . 'Compiler ' );
46- return new CssLoader ($ compiler , $ this ->formatTempPath ($ name ));
46+ return new CssLoader ($ compiler , $ this ->formatTempPath (' css ' , $ name ));
4747 }
4848
4949 /**
@@ -54,17 +54,17 @@ public function createJavaScriptLoader($name)
5454 {
5555 /** @var Compiler $compiler */
5656 $ compiler = $ this ->serviceLocator ->getService ($ this ->extensionName . '.js ' . ucfirst ($ name ) . 'Compiler ' );
57- return new JavaScriptLoader ($ compiler , $ this ->formatTempPath ($ name ));
57+ return new JavaScriptLoader ($ compiler , $ this ->formatTempPath (' js ' , $ name ));
5858 }
5959
6060 /**
6161 * @param string $name
6262 * @return string
6363 */
64- private function formatTempPath ($ name )
64+ private function formatTempPath ($ type , $ name )
6565 {
6666 $ lName = strtolower ($ name );
67- $ tempPath = isset ($ this ->tempPaths [$ lName ]) ? $ this ->tempPaths [$ lName ] : Extension::DEFAULT_TEMP_PATH ;
67+ $ tempPath = isset ($ this ->tempPaths [$ type ][ $ lName ]) ? $ this ->tempPaths [ $ type ] [$ lName ] : Extension::DEFAULT_TEMP_PATH ;
6868 return rtrim ($ this ->httpRequest ->getUrl ()->basePath , '/ ' ) . '/ ' . $ tempPath ;
6969 }
7070
You can’t perform that action at this time.
0 commit comments