simplify by making Smarty include directives behave like Friendica native ones
This commit is contained in:
@@ -477,6 +477,7 @@ function get_markup_template($s, $root = '') {
|
||||
// $tt = microtime() - $ts;
|
||||
// $a->page['debug'] .= "$tt <br>\n";
|
||||
// return $file_contents;
|
||||
// logger($template_file);
|
||||
return file_get_contents($template_file);
|
||||
}
|
||||
}}
|
||||
@@ -499,21 +500,6 @@ function get_template_file($a, $filename, $root = '') {
|
||||
return $template_file;
|
||||
}}
|
||||
|
||||
if(! function_exists("set_template_includes")) {
|
||||
function set_template_includes($engine, $includes) {
|
||||
if($engine === 'smarty3') {
|
||||
$a = get_app();
|
||||
foreach($includes as $name=>$path) {
|
||||
// $sm_includes[$name] = $_SERVER['DOCUMENT_ROOT'] . '/' . get_template_file($a, 'smarty3/' . $path);
|
||||
$sm_includes[$name] = get_template_file($a, 'smarty3/' . $path);
|
||||
}
|
||||
return $sm_includes;
|
||||
}
|
||||
else {
|
||||
return $includes;
|
||||
}
|
||||
}}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user