aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Render/SmartyTemplate.php
diff options
context:
space:
mode:
authorMario Vavti <mario@mariovavti.com>2018-10-19 11:18:28 +0200
committerMario Vavti <mario@mariovavti.com>2018-10-19 11:18:28 +0200
commitfa9e9510e5d993d183feb942fe74be5fdd07f5cf (patch)
tree41fec09f527a9346e043b8099b458a97d81b03ed /Zotlabs/Render/SmartyTemplate.php
parent32de123db0ac526795a237ff46885fe8a332cbc0 (diff)
parent06b3ad1071c755757555baf941e2c0f446f97b21 (diff)
downloadvolse-hubzilla-fa9e9510e5d993d183feb942fe74be5fdd07f5cf.tar.gz
volse-hubzilla-fa9e9510e5d993d183feb942fe74be5fdd07f5cf.tar.bz2
volse-hubzilla-fa9e9510e5d993d183feb942fe74be5fdd07f5cf.zip
Merge branch '3.8RC'3.8
Diffstat (limited to 'Zotlabs/Render/SmartyTemplate.php')
-rwxr-xr-xZotlabs/Render/SmartyTemplate.php19
1 files changed, 11 insertions, 8 deletions
diff --git a/Zotlabs/Render/SmartyTemplate.php b/Zotlabs/Render/SmartyTemplate.php
index ffe58e286..f14d63064 100755
--- a/Zotlabs/Render/SmartyTemplate.php
+++ b/Zotlabs/Render/SmartyTemplate.php
@@ -64,17 +64,20 @@ class SmartyTemplate implements TemplateEngine {
public function get_intltext_template($file, $root='') {
$lang = \App::$language;
-
- if(file_exists("view/$lang/$file"))
- $template_file = "view/$lang/$file";
- elseif(file_exists("view/en/$file"))
- $template_file = "view/en/$file";
- else
- $template_file = theme_include($file,$root);
+ if ($root != '' && substr($root,-1) != '/' ) {
+ $root .= '/';
+ }
+ foreach (Array(
+ $root."view/$lang/$file",
+ $root."view/en/$file",
+ ''
+ ) as $template_file) {
+ if (is_file($template_file)) { break; }
+ }
+ if ($template_file=='') {$template_file = theme_include($file,$root);}
if($template_file) {
$template = new SmartyInterface();
$template->filename = $template_file;
-
return $template;
}
return "";