]> git.mxchange.org Git - core.git/commitdiff
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 dfe0770424b2a19faf507a501ebfc23be8f54e7b..17cdcd5373ad22f616149f35b61236dfe81ebec3 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 543bd88f6d182e44dd549f6e6174f2a7259f33a4..4ca5c4a7159a0c0825edecb4f35ae940ceeb959c 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 {