Continued a bit:
authorRoland Haeder <roland@mxchange.org>
Wed, 29 Jun 2016 18:04:56 +0000 (20:04 +0200)
committerRoland Haeder <roland@mxchange.org>
Wed, 29 Jun 2016 18:07:35 +0000 (20:07 +0200)
- 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

Signed-off-by: Roland H├Ąder <roland@mxchange.org>
.gitattributes
inc/main/classes/template/class_BaseTemplateEngine.php

index dfe0770..17cdcd5 100644 (file)
@@ -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
index 543bd88..4ca5c4a 100644 (file)
@@ -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 {