summaryrefslogtreecommitdiff
path: root/inc/template.php
diff options
context:
space:
mode:
Diffstat (limited to 'inc/template.php')
-rw-r--r--inc/template.php6
1 files changed, 5 insertions, 1 deletions
diff --git a/inc/template.php b/inc/template.php
index ef688944..6d417631 100644
--- a/inc/template.php
+++ b/inc/template.php
@@ -35,7 +35,7 @@ function load_twig() {
}
function Element($templateFile, array $options) {
- global $config, $debug, $twig;
+ global $config, $debug, $twig, $build_pages;
if (!$twig)
load_twig();
@@ -47,8 +47,12 @@ function Element($templateFile, array $options) {
if (isset($options['body']) && $config['debug']) {
if (isset($debug['start'])) {
$debug['time'] = '~' . round((microtime(true) - $debug['start']) * 1000, 2) . 'ms';
+ $debug['time (initialization)'] = '~' . round(($debug['start_debug'] - $debug['start']) * 1000, 2) . 'ms';
unset($debug['start']);
+ unset($debug['start_debug']);
}
+ if ($config['try_smarter'] && isset($build_pages) && !empty($build_pages))
+ $debug['build_pages'] = $build_pages;
$debug['included'] = get_included_files();
$debug['memory'] = round(memory_get_usage(true) / (1024 * 1024), 2) . ' MiB';
$options['body'] .=