]> git.mxchange.org Git - core.git/blobdiff - framework/main/classes/template/console/class_ConsoleTemplateEngine.php
Continued with rewrites:
[core.git] / framework / main / classes / template / console / class_ConsoleTemplateEngine.php
index e6305d81ea9f42007419cdddb1f897147e861925..0464ce97958baca59ae7e1ec51f986f23a592552 100644 (file)
@@ -62,7 +62,7 @@ class ConsoleTemplateEngine extends BaseTemplateEngine implements CompileableTem
                $applicationInstance = Registry::getRegistry()->getInstance('app');
 
                // 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)) {
@@ -87,7 +87,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;