From d7ef9b1738d12867e4849ceccd1365a4146f5ae2 Mon Sep 17 00:00:00 2001 From: Samuel Georges Date: Sat, 18 Jun 2016 09:23:16 +1000 Subject: [PATCH] Apply chmod rules to combiner cache --- modules/system/classes/CombineAssets.php | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/modules/system/classes/CombineAssets.php b/modules/system/classes/CombineAssets.php index 05a2e7b1b..eede1b799 100644 --- a/modules/system/classes/CombineAssets.php +++ b/modules/system/classes/CombineAssets.php @@ -14,7 +14,7 @@ use Assetic\Asset\FileAsset; use Assetic\Asset\GlobAsset; use Assetic\Asset\AssetCache; use Assetic\Asset\AssetCollection; -use Assetic\Cache\FilesystemCache; +use October\Rain\Parse\Assetic\FilesystemCache; use System\Helpers\Cache as CacheHelper; use ApplicationException; use DateTime; @@ -98,21 +98,21 @@ class CombineAssets /* * Register JavaScript filters */ - $this->registerFilter('js', new \October\Rain\Support\Filters\JavascriptImporter); + $this->registerFilter('js', new \October\Rain\Parse\Assetic\JavascriptImporter); /* * Register CSS filters */ $this->registerFilter('css', new \Assetic\Filter\CssImportFilter); $this->registerFilter(['css', 'less'], new \Assetic\Filter\CssRewriteFilter); - $this->registerFilter('less', new \October\Rain\Support\Filters\LessCompiler); + $this->registerFilter('less', new \October\Rain\Parse\Assetic\LessCompiler); /* * Minification filters */ if ($this->useMinify) { $this->registerFilter('js', new \Assetic\Filter\JSMinFilter); - $this->registerFilter(['css', 'less'], new \October\Rain\Support\Filters\StylesheetMinify); + $this->registerFilter(['css', 'less'], new \October\Rain\Parse\Assetic\StylesheetMinify); } /* @@ -337,6 +337,10 @@ class CombineAssets return $collection; } + if (!File::isDirectory($this->storagePath)) { + File::makeDirectory($this->storagePath); + } + $cache = new FilesystemCache($this->storagePath); $cachedCollection = new AssetCache($collection, $cache); return $cachedCollection;