Skip to content

Commit

Permalink
fixes #5325 use setImportDir instead of addImportDir so that the defa…
Browse files Browse the repository at this point in the history
…ult dir "" (empty string) is not used (as it triggers warning on windows with openbasedir)

This fixes error Warning:is_file(): open_basedir restriction in effect. File(/plugins/Zeitgeist/stylesheets/less/_colors.less.less) is not within the allowed path(s): (C:\Inetpub\temp;D:\Inetpub) in D:\Inetpub\WWWRoot\piwik\vendor\leafo\lessphp\lessc.inc.php on line 82
  • Loading branch information
mattab committed Jun 24, 2014
1 parent 1daa3c1 commit 8c7a567
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions core/AssetManager/UIAssetMerger/StylesheetUIAssetMerger.php
Expand Up @@ -30,8 +30,10 @@ function __construct($mergedAsset, $assetFetcher, $cacheBuster)

protected function getMergedAssets()
{
$this->lessCompiler->addImportDir(PIWIK_USER_PATH);
return $this->lessCompiler->compile($this->getConcatenatedAssets());
// note: we're using setImportDir on purpose (not addImportDir)
$this->lessCompiler->setImportDir(PIWIK_USER_PATH);
$concatenatedAssets = $this->getConcatenatedAssets();
return $this->lessCompiler->compile($concatenatedAssets);
}

/**
Expand Down

0 comments on commit 8c7a567

Please sign in to comment.