diff options
author | zotlabs <mike@macgirvin.com> | 2018-08-20 20:20:57 -0700 |
---|---|---|
committer | zotlabs <mike@macgirvin.com> | 2018-08-20 20:20:57 -0700 |
commit | 066febdf4092a308d70e9989b322afb470253132 (patch) | |
tree | bc74661ddc623c6a8e2525355bb12c8f439529bf /Zotlabs | |
parent | 9b620b2a35e256c905b6e3bd0e6f0228a0426e07 (diff) | |
parent | e25db4d1b57116353ad4e4909eb93824a673ffb3 (diff) | |
download | volse-hubzilla-066febdf4092a308d70e9989b322afb470253132.tar.gz volse-hubzilla-066febdf4092a308d70e9989b322afb470253132.tar.bz2 volse-hubzilla-066febdf4092a308d70e9989b322afb470253132.zip |
Merge branch 'dev' of https://framagit.org/hubzilla/core into xdev_merge
Diffstat (limited to 'Zotlabs')
-rwxr-xr-x | Zotlabs/Render/SmartyTemplate.php | 19 |
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 ""; |