From: Victor Dubiniuk Date: Mon, 6 Oct 2014 16:39:02 +0000 (+0300) Subject: Add CssImportFilter. More elegant fix for documents#348 X-Git-Tag: v8.0.0alpha1~568^2 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=b6087ea79be774fc12166b876a865643011c5749;p=nextcloud-server.git Add CssImportFilter. More elegant fix for documents#348 --- diff --git a/lib/private/templatelayout.php b/lib/private/templatelayout.php index 7ac0bd97abe..e9172fd2da5 100644 --- a/lib/private/templatelayout.php +++ b/lib/private/templatelayout.php @@ -3,6 +3,7 @@ use Assetic\Asset\AssetCollection; use Assetic\Asset\FileAsset; use Assetic\AssetWriter; use Assetic\Filter\CssRewriteFilter; +use Assetic\Filter\CssImportFilter; /** * Copyright (c) 2012 Bart Visscher @@ -167,7 +168,15 @@ class OC_TemplateLayout extends OC_Template { $assetPath = $root . '/' . $file; $sourceRoot = \OC::$SERVERROOT; $sourcePath = substr($assetPath, strlen(\OC::$SERVERROOT)); - return new FileAsset($assetPath, array(new CssRewriteFilter()), $sourceRoot, $sourcePath); + return new FileAsset( + $assetPath, + array( + new CssRewriteFilter(), + new CssImportFilter() + ), + $sourceRoot, + $sourcePath + ); }, $cssFiles); $cssCollection = new AssetCollection($cssFiles); $cssCollection->setTargetPath("assets/$cssHash.css");