aboutsummaryrefslogtreecommitdiffstats
path: root/include/plugin.php
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2013-05-15 21:21:44 -0700
committerfriendica <info@friendica.com>2013-05-15 21:21:44 -0700
commitb00c900fa2d999657b17caf577acea5ab772dec1 (patch)
tree5a8e325ac072278a6d77cb63055e748f9315c7e5 /include/plugin.php
parent343fb61badf0e58070314592a24397a8692d1f45 (diff)
downloadvolse-hubzilla-b00c900fa2d999657b17caf577acea5ab772dec1.tar.gz
volse-hubzilla-b00c900fa2d999657b17caf577acea5ab772dec1.tar.bz2
volse-hubzilla-b00c900fa2d999657b17caf577acea5ab772dec1.zip
fix intltext templates - maybe
Diffstat (limited to 'include/plugin.php')
-rwxr-xr-xinclude/plugin.php27
1 files changed, 4 insertions, 23 deletions
diff --git a/include/plugin.php b/include/plugin.php
index 8406c45e5..b65ca6e98 100755
--- a/include/plugin.php
+++ b/include/plugin.php
@@ -540,30 +540,11 @@ function theme_include($file, $root = '') {
function get_intltext_template($s) {
- global $a;
-
- if(! isset($a->language))
- $a->language = 'en';
-
- $engine = '';
- if($a->get_template_engine() === 'smarty3')
- $engine = "/smarty3";
-
- $file = '';
- if(file_exists("view/{$a->language}$engine/$s"))
- $file = "view/{$a->language}$engine/$s";
- elseif(file_exists("view/en$engine/$s"))
- $file = "view/en$engine/$s";
- else
- $file = "view/tpl/$engine/$s";
- if($engine === '/smarty3') {
- $template = new FriendicaSmarty();
- $template->filename = $file;
+ $a = get_app();
+ $t = $a->template_engine();
- return $template;
- }
- else
- return file_get_contents($file);
+ $template = $t->get_intltext_template($s, $root);
+ return $template;
}