Skip to content

Commit

Permalink
Fix bootstrap less compiler if flattensetup is not available - fixes #20
Browse files Browse the repository at this point in the history
  • Loading branch information
benjaminkott committed Jul 21, 2014
1 parent e55d0f1 commit 25fce39
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Classes/Service/CompileService.php
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,9 @@ public function getCompiledFile($file) {
public function getVariablesFromConstants(){
$variables = array();
$prefix = "plugin.bootstrap_package.settings.less.";
if(!isset($GLOBALS['TSFE']->tmpl->flatSetup) || !is_array($GLOBALS['TSFE']->tmpl->flatSetup) || count($GLOBALS['TSFE']->tmpl->flatSetup) === 0){
$GLOBALS['TSFE']->tmpl->generateConfig();
}
foreach($GLOBALS['TSFE']->tmpl->flatSetup as $constant => $value){
if(strpos($constant, $prefix) === 0){
$variables[substr($constant, strlen($prefix))] = $value;
Expand Down

0 comments on commit 25fce39

Please sign in to comment.