X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FCore%2FRenderer.php;h=ad1717ae83f422495425179620632d673ed867b7;hb=fa55928ea3978e96bf1cc21f3759f5607f3ef503;hp=75a869a38be2f4dd8a12fc89e3dc77c215a758df;hpb=054c301ef0345c4ff9f35cfd08717757eab17b9d;p=friendica.git diff --git a/src/Core/Renderer.php b/src/Core/Renderer.php index 75a869a38b..ad1717ae83 100644 --- a/src/Core/Renderer.php +++ b/src/Core/Renderer.php @@ -48,7 +48,6 @@ class Renderer * beyond are used. */ public static $theme = [ - 'sourcename' => '', 'videowidth' => 425, 'videoheight' => 350, 'stylesheet' => '', @@ -74,7 +73,7 @@ class Renderer */ public static function replaceMacros(string $template, array $vars = []) { - $stamp1 = microtime(true); + DI::profiler()->startRecording('rendering'); // pass $baseurl to all templates if it isn't set $vars = array_merge(['$baseurl' => DI::baseUrl()->get(), '$APP' => DI::app()], $vars); @@ -91,7 +90,7 @@ class Renderer throw new InternalServerErrorException($message); } - DI::profiler()->saveTimestamp($stamp1, "rendering"); + DI::profiler()->stopRecording(); return $output; } @@ -107,7 +106,7 @@ class Renderer */ public static function getMarkupTemplate($file, $subDir = '') { - $stamp1 = microtime(true); + DI::profiler()->startRecording('file'); $t = self::getTemplateEngine(); try { @@ -120,7 +119,7 @@ class Renderer throw new InternalServerErrorException($message); } - DI::profiler()->saveTimestamp($stamp1, "file"); + DI::profiler()->stopRecording(); return $template; } @@ -167,7 +166,7 @@ class Renderer } else { $a = DI::app(); $class = self::$template_engines[$template_engine]; - $obj = new $class($a->getCurrentTheme(), $a->theme_info); + $obj = new $class($a->getCurrentTheme(), $a->getThemeInfo()); self::$template_engine_instance[$template_engine] = $obj; return $obj; }