summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2014-10-07 08:28:08 +0200
committerMorris Jobke <hey@morrisjobke.de>2014-10-07 08:28:08 +0200
commit6323d5fb3aa26ca777004595db255074e2f31079 (patch)
tree825f4bf5619aca4feba607c21fddde0f8254f69d
parent01be0af209b1800de1ffb94ef24badc81b60f7d0 (diff)
parentb6087ea79be774fc12166b876a865643011c5749 (diff)
downloadnextcloud-server-6323d5fb3aa26ca777004595db255074e2f31079.tar.gz
nextcloud-server-6323d5fb3aa26ca777004595db255074e2f31079.zip
Merge pull request #11437 from owncloud/add-import-filter
Add CssImportFilter. More elegant fix for documents#348
-rw-r--r--lib/private/templatelayout.php11
1 files changed, 10 insertions, 1 deletions
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 <bartv@thisnet.nl>
@@ -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");