simplify by making Smarty include directives behave like Friendica native ones

This commit is contained in:
Zach Prezkuta
2012-12-25 11:48:02 -07:00
parent 6603758a5e
commit 11c06e21b7
73 changed files with 376 additions and 587 deletions

View File

@@ -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;
}
}}