]> git.mxchange.org Git - core.git/blobdiff - framework/main/classes/template/menu/class_MenuTemplateEngine.php
Continued with rewrites:
[core.git] / framework / main / classes / template / menu / class_MenuTemplateEngine.php
index c5601b4c647d46b1ac6c5f17ccdcb2cb3bb9d51d..316f1518b8b4f41f011ff397950581d1ce4613b7 100644 (file)
@@ -151,7 +151,7 @@ class MenuTemplateEngine 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)) {
@@ -176,7 +176,10 @@ class MenuTemplateEngine extends BaseTemplateEngine implements CompileableTempla
                $templateInstance->setCodeTemplateExtension($templateInstance->getConfigInstance()->getConfigEntry('menu_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')
+               ));
 
                // Set the menu instance
                $templateInstance->setMenuInstance($menuInstance);
@@ -866,11 +869,13 @@ class MenuTemplateEngine extends BaseTemplateEngine implements CompileableTempla
         * @return      $fqfn   Full-qualified file name of the menu cache
         */
        public function getMenuCacheFqfn () {
+               // Get the application instance from registry
+               $applicationInstance = Registry::getRegistry()->getInstance('app');
+
                // Get the FQFN ready
-               $fqfn = sprintf('%s%s%s/%s.%s',
-                       $this->getConfigInstance()->getConfigEntry('base_path'),
-                       $this->getGenericBasePath(),
-                       'menus/_cache',
+               $fqfn = sprintf('%s%smenus/_cache/%s.%s',
+                       $this->getConfigInstance()->getConfigEntry('application_base_path'),
+                       $applicationInstance->getAppShortName(),
                        md5(
                                $this->getMenuInstance()->getMenuName() . ':' .
                                $this->__toString() . ':' .