From e0cbbbf918e17d1c6b415c2f9bd4780b97c4f204 Mon Sep 17 00:00:00 2001 From: friendica Date: Sat, 9 Feb 2013 13:20:10 -0800 Subject: smarty support in intltext, fix old pending accounts query in ping, log failed email register notify --- include/plugin.php | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) (limited to 'include/plugin.php') diff --git a/include/plugin.php b/include/plugin.php index b48cadb1e..6660fba59 100644 --- a/include/plugin.php +++ b/include/plugin.php @@ -514,12 +514,22 @@ function get_intltext_template($s) { if($a->get_template_engine() === 'smarty3') $engine = "/smarty3"; + $file = ''; if(file_exists("view/{$a->language}$engine/$s")) - return file_get_contents("view/{$a->language}$engine/$s"); + $file = "view/{$a->language}$engine/$s"; elseif(file_exists("view/en$engine/$s")) - return file_get_contents("view/en$engine/$s"); + $file = "view/en$engine/$s"; else - return file_get_contents("view/tpl/$engine/$s"); + $file = "view/tpl/$engine/$s"; + if($engine === '/smarty3') { + $template = new FriendicaSmarty(); + $template->filename = $file; + + return $template; + } + else + return file_get_contents($file); + }} if(! function_exists('get_markup_template')) { -- cgit v1.2.3