Fixes:
authorRoland Häder <roland@mxchange.org>
Mon, 22 May 2017 18:57:56 +0000 (20:57 +0200)
committerRoland Häder <roland@mxchange.org>
Mon, 22 May 2017 18:57:56 +0000 (20:57 +0200)
- Opps, application_base_path was somehow double
- use DIRECRORY_SEPARATOR
- renamed variable to clarify it

Signed-off-by: Roland Häder <roland@mxchange.org>
framework/main/classes/template/class_BaseTemplateEngine.php

index fd116e5cf166fa48a410e50b79ef68b541b09d78..14861e3eb4face9f3882d1a66b8f609c3da1956d 100644 (file)
@@ -671,12 +671,12 @@ class BaseTemplateEngine extends BaseFrameworkSystem {
        /**
         * Private loader for all template types
         *
        /**
         * Private loader for all template types
         *
-        * @param       $template       The template we shall load
+        * @param       $templateName   The template we shall load
         * @param       $extOther       An other extension to use
         * @return      void
         * @throws      FileNotFoundException   If the template was not found
         */
         * @param       $extOther       An other extension to use
         * @return      void
         * @throws      FileNotFoundException   If the template was not found
         */
-       protected function loadTemplate ($template, $extOther = '') {
+       protected function loadTemplate ($templateName, $extOther = '') {
                // Get extension for the template if empty
                if (empty($extOther)) {
                        // None provided, so get the raw one
                // Get extension for the template if empty
                if (empty($extOther)) {
                        // None provided, so get the raw one
@@ -691,12 +691,12 @@ class BaseTemplateEngine extends BaseFrameworkSystem {
                 * now entirely done by php_intl. These old thing with language-based
                 * template paths comes from an older time.
                 */
                 * now entirely done by php_intl. These old thing with language-based
                 * template paths comes from an older time.
                 */
-               $fqfn = sprintf('%s%s%s%s/%s%s',
-                       $this->getConfigInstance()->getConfigEntry('application_base_path'),
+               $fqfn = sprintf('%s%s%s%s%s%s',
                        $this->getTemplateBasePath(),
                        $this->getGenericBasePath(),
                        $this->getTemplateType(),
                        $this->getTemplateBasePath(),
                        $this->getGenericBasePath(),
                        $this->getTemplateType(),
-                       (string) $template,
+                       DIRECTORY_SEPARATOR,
+                       (string) $templateName,
                        $ext
                );
 
                        $ext
                );
 
@@ -711,7 +711,7 @@ class BaseTemplateEngine extends BaseFrameworkSystem {
                                $ext = $this->getCodeTemplateExtension();
 
                                // Try it again...
                                $ext = $this->getCodeTemplateExtension();
 
                                // Try it again...
-                               $this->loadTemplate($template, $ext);
+                               $this->loadTemplate($templateName, $ext);
                        } else {
                                // Throw it again
                                throw new FileNotFoundException($fqfn, self::EXCEPTION_FILE_NOT_FOUND);
                        } else {
                                // Throw it again
                                throw new FileNotFoundException($fqfn, self::EXCEPTION_FILE_NOT_FOUND);