From: Hypolite Petovan Date: Sat, 3 Feb 2018 13:52:55 +0000 (-0500) Subject: Remove get_template_file function X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=7be49913d4ed915c5dc51b7994a1ca055d9e7eee;p=friendica.git Remove get_template_file function --- diff --git a/include/text.php b/include/text.php index 3244d7bb97..ab0d707e7a 100644 --- a/include/text.php +++ b/include/text.php @@ -613,36 +613,6 @@ function get_markup_template($s, $root = '') { return $template; } - -/** - * - * @param App $a - * @param string $filename - * @param string $root - * @return string - */ -function get_template_file($a, $filename, $root = '') { - $theme = current_theme(); - - // Make sure $root ends with a slash / - if ($root !== '' && substr($root, -1, 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(sprintf('%sview/theme/%s}/%s', $root, $a->theme_info["extends"], $filename))) { - $template_file = sprintf('%sview/theme/%s}/%s', $root, $a->theme_info["extends"], $filename); - } elseif (file_exists("{$root}/$filename")) { - $template_file = "{$root}/$filename"; - } else { - $template_file = "{$root}view/$filename"; - } - - return $template_file; -} - - /** * for html,xml parsing - let's say you've got * an attribute foobar="class1 class2 class3"