X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=include%2Ftext.php;h=c7fb7a67d657376e3cd2469a7fc8f6dac23392cd;hb=b00426c9fb375c6b1d985f88d7132c8a669c2a7e;hp=1d74d9cf5c4bc19df856707acf6f30cd1bd0adc6;hpb=e50c0efcdfa05f682201deb630b6147755c87fe4;p=friendica.git diff --git a/include/text.php b/include/text.php index 1d74d9cf5c..c7fb7a67d6 100644 --- a/include/text.php +++ b/include/text.php @@ -23,7 +23,6 @@ function replace_macros($s,$r) { if(gettype($s) === 'string') { $template = $s; $s = new FriendicaSmarty(); - $s->error_reporting = E_ALL & ~E_NOTICE; } foreach($r as $key=>$value) { if($key[0] === '$') { @@ -490,12 +489,12 @@ function get_template_file($a, $filename, $root = '') { if($root !== '' && $root[strlen($root)-1] !== '/') $root = $root . '/'; - if(file_exists($root . "view/theme/$theme/$filename")) - $template_file = $root . "view/theme/$theme/$filename"; - elseif (x($a->theme_info,"extends") && file_exists($root . "view/theme/".$a->theme_info["extends"]."/$filename")) - $template_file = $root . "view/theme/".$a->theme_info["extends"]."/$filename"; + if(file_exists("{$root}view/theme/$theme/$filename")) + $template_file = "{$root}view/theme/$theme/$filename"; + elseif (x($a->theme_info,"extends") && file_exists("{$root}view/theme/{$a->theme_info["extends"]}/$filename")) + $template_file = "{$root}view/theme/{$a->theme_info["extends"]}/$filename"; else - $template_file = $root . "view/$filename"; + $template_file = "{$root}view/$filename"; return $template_file; }} @@ -1042,16 +1041,27 @@ function prepare_body($item,$attach = false) { return $s; } - $arr = explode(',',$item['attach']); + $arr = explode('[/attach],',$item['attach']); if(count($arr)) { $s .= '