From 4ea53a936218cc17c3be1f903556968cb45399d1 Mon Sep 17 00:00:00 2001 From: Roland Haeder Date: Wed, 29 Jun 2016 20:04:56 +0200 Subject: [PATCH] Continued a bit: - line-feed is now Linux/Uni* way - no more language-dependent templates, keep language out of them as they should only define the structure of the website. Localization should be done with e.g. php_intl MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Roland Häder --- .gitattributes | 4 +-- .../template/class_BaseTemplateEngine.php | 36 +++++++------------ 2 files changed, 15 insertions(+), 25 deletions(-) diff --git a/.gitattributes b/.gitattributes index dfe07704..17cdcd53 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,2 +1,2 @@ -# Auto detect text files and perform LF normalization -* text=auto +# Use Linux/Uni* line-feed for new lines (prevents converting) +* text=lf diff --git a/inc/main/classes/template/class_BaseTemplateEngine.php b/inc/main/classes/template/class_BaseTemplateEngine.php index 543bd88f..4ca5c4a7 100644 --- a/inc/main/classes/template/class_BaseTemplateEngine.php +++ b/inc/main/classes/template/class_BaseTemplateEngine.php @@ -674,29 +674,19 @@ class BaseTemplateEngine extends BaseFrameworkSystem { $ext = (string) $extOther; } - // Is language support enabled? - if ($this->isLanguageSupportEnabled()) { - // Construct the FQFN for the template by honoring the current language - $fqfn = sprintf('%s%s%s%s/%s/%s%s', - $this->getConfigInstance()->getConfigEntry('base_path'), - $this->getTemplateBasePath(), - $this->getGenericBasePath(), - $this->getLanguageInstance()->getLanguageCode(), - $this->getTemplateType(), - (string) $template, - $ext - ); - } else { - // Construct the FQFN for the template without language - $fqfn = sprintf('%s%s%s%s/%s%s', - $this->getConfigInstance()->getConfigEntry('base_path'), - $this->getTemplateBasePath(), - $this->getGenericBasePath(), - $this->getTemplateType(), - (string) $template, - $ext - ); - } + /* + * Construct the FQFN for the template without language as language is + * 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('base_path'), + $this->getTemplateBasePath(), + $this->getGenericBasePath(), + $this->getTemplateType(), + (string) $template, + $ext + ); // First try this try { -- 2.39.5