// Get out if the system doesn't have public access allowed
if (intval(Config::get('system', 'block_public'))) {
- System::httpExit(401);
+ throw new \Friendica\Network\HTTPException\ForbiddenException();
}
// Return the raw content of the template. We use this to make templates usable for js functions.
{
// We load the whole template system to get the filename.
// Maybe we can do it a little bit smarter if I get time.
- $t = Renderer::getMarkupTemplate($template, $root);
- $filename = $t->filename;
+ $templateEngine = Renderer::getTemplateEngine();
+ $template = $templateEngine->getTemplateFile($template, $root);
+
+ $filename = $template->filename;
// Get the content of the template file
if (file_exists($filename)) {