diff options
-rw-r--r-- | inc/render.inc.php | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/inc/render.inc.php b/inc/render.inc.php index 31ba5a7d..6de00eee 100644 --- a/inc/render.inc.php +++ b/inc/render.inc.php @@ -166,10 +166,13 @@ class Render */ public static function parse($template, $params = false) { - // Get all translated strings for this template - $dictionary = Dictionary::getArrayTemplate($template); // Load html snippet $html = self::getTemplate($template); + if ($html === false) { + return '<h3>Template ' . htmlspecialchars($template) . '</h3>' . nl2br(htmlspecialchars(print_r($params, true))) . '<hr>'; + } + // Get all translated strings for this template + $dictionary = Dictionary::getArrayTemplate($template); // Now find all language tags in this array preg_match_all('/{{(lang_.+?)}}/', $html, $out); foreach ($out[1] as $tag) { @@ -228,8 +231,6 @@ class Render } // Load from disk $data = @file_get_contents('templates/' . $template . '.html'); - if ($data === false) - $data = '<b>Non-existent template ' . $template . ' requested!</b>'; self::$templateCache[$template] = & $data; return $data; } |