From: Roland Häder Date: Mon, 22 May 2017 18:57:56 +0000 (+0200) Subject: Fixes: X-Git-Url: https://git.mxchange.org/?p=core.git;a=commitdiff_plain;h=7c1f6da0bb508c369410ff7fed93395bd9a9e65a Fixes: - Opps, application_base_path was somehow double - use DIRECRORY_SEPARATOR - renamed variable to clarify it Signed-off-by: Roland Häder --- diff --git a/framework/main/classes/template/class_BaseTemplateEngine.php b/framework/main/classes/template/class_BaseTemplateEngine.php index fd116e5c..14861e3e 100644 --- a/framework/main/classes/template/class_BaseTemplateEngine.php +++ b/framework/main/classes/template/class_BaseTemplateEngine.php @@ -671,12 +671,12 @@ class BaseTemplateEngine extends BaseFrameworkSystem { /** * 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 */ - 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 @@ -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. */ - $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(), - (string) $template, + DIRECTORY_SEPARATOR, + (string) $templateName, $ext ); @@ -711,7 +711,7 @@ class BaseTemplateEngine extends BaseFrameworkSystem { $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);