X-Git-Url: https://git.mxchange.org/?p=core.git;a=blobdiff_plain;f=framework%2Fmain%2Fclasses%2Ftemplate%2Fconsole%2Fclass_ConsoleTemplateEngine.php;h=7288e21c713d3f6a39eb4afb81acbd0dfcb9ce5d;hp=9d485c4e9b191ef347e6af95b0d4ab068651286a;hb=8d8cf621bd811811cecd83c65a4ab91f27258e79;hpb=3bb159161d180dd4c9a9d404f40bd77e855d56c4 diff --git a/framework/main/classes/template/console/class_ConsoleTemplateEngine.php b/framework/main/classes/template/console/class_ConsoleTemplateEngine.php index 9d485c4e..7288e21c 100644 --- a/framework/main/classes/template/console/class_ConsoleTemplateEngine.php +++ b/framework/main/classes/template/console/class_ConsoleTemplateEngine.php @@ -1,10 +1,12 @@ getInstance('app'); + $applicationInstance = GenericRegistry::getRegistry()->getInstance('application'); // Determine base path - $templateBasePath = $templateInstance->getConfigInstance()->getConfigEntry('application_base_path') . $applicationInstance->getRequestInstance()->getRequestElement('app') . '/'; + $templateBasePath = $templateInstance->getConfigInstance()->getConfigEntry('application_base_path') . $applicationInstance->getAppShortName(). '/'; // Is the base path valid? if (empty($templateBasePath)) { @@ -86,7 +88,10 @@ class ConsoleTemplateEngine extends BaseTemplateEngine implements CompileableTem $templateInstance->setCodeTemplateExtension($templateInstance->getConfigInstance()->getConfigEntry('code_template_extension')); // Absolute output path for compiled templates - $templateInstance->setCompileOutputPath($templateInstance->getConfigInstance()->getConfigEntry('base_path') . $templateInstance->getConfigInstance()->getConfigEntry('compile_output_path')); + $templateInstance->setCompileOutputPath(sprintf('%s%s/', + $templateBasePath, + $templateInstance->getConfigInstance()->getConfigEntry('compile_output_path') + )); // Return the prepared instance return $templateInstance;