N°2982 - fix delta xml variables not used in themes

This commit is contained in:
odain
2021-04-12 22:14:00 +02:00
parent c0f5906dce
commit 903afff687
10 changed files with 235 additions and 71 deletions

View File

@@ -215,7 +215,7 @@ class ThemeHandler
* @param boolean $bSetup
* @param string $sSetupCompilationTimestamp : setup compilation timestamp in micro secunds
* @param array|null $aThemeParameters Parameters (variables, imports, stylesheets) for the theme, if not passed, will be retrieved from compiled DM
* @param array|null $aImportsPaths Paths where imports can be found. Must end with '/'
* @param array|null $aImportsPaths Folder paths where imports can be found. Must end with '/'
* @param string|null $sWorkingPath Path of the folder used during compilation. Must end with a '/'
*
* @throws \CoreException
@@ -342,11 +342,12 @@ CSS;
static::$oCompileCSSService = new CompileCSSService();
}
//store it again to change $version with latest compiled time
SetupLog::Info("Compiling theme $sThemeId...");
$sTmpThemeCssContent = static::$oCompileCSSService->CompileCSSFromSASS($sTmpThemeScssContent, $aImportsPaths,
$aThemeParametersWithVersion);
SetupLog::Info("$sThemeId theme compilation done.");
file_put_contents($sThemeFolderPath.'/theme-parameters.json', json_encode($aThemeParameters));
file_put_contents($sThemeCssPath, $sSignatureComment.$sTmpThemeCssContent);
SetupLog::Info("Theme $sThemeId file compiled.");
return true;
}
}
@@ -939,7 +940,8 @@ CSS;
{
$aThemeParametersVariable = array_merge([], $aThemeParameters['variables']);
}
}
}
if (array_key_exists('imports_variable', $aThemeParameters))
{
if (is_array($aThemeParameters['imports_variable']))