Continued with rewrites:
[core.git] / framework / main / classes / template / mail / class_MailTemplateEngine.php
index 7ff55f3078cae400d48799a47e54a17210aeb041..763d46028ae431b022f3b4d88856c393e3040373 100644 (file)
@@ -92,7 +92,7 @@ class MailTemplateEngine extends BaseTemplateEngine implements CompileableTempla
                $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)) {
@@ -117,7 +117,10 @@ class MailTemplateEngine extends BaseTemplateEngine implements CompileableTempla
                $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;