diff options
| author | ctrlcctrlv <wizardchan@hush.com> | 2013-08-29 13:43:50 +0000 |
|---|---|---|
| committer | ctrlcctrlv <wizardchan@hush.com> | 2013-08-29 13:43:50 +0000 |
| commit | 2804c6b775b07b5417d95b160674570600ff047f (patch) | |
| tree | 17aa60a9755be050a163403bcfaf54dd78c5ba4d /inc/template.php | |
| parent | ee52dcb5835caa2193570d17e174ee812bb1f2fe (diff) | |
| parent | 8de81d176cc379687abbfebc3daa72e96068d49a (diff) | |
Merge remote-tracking branch 'upstream/master' (vichan-devel)
Diffstat (limited to 'inc/template.php')
| -rw-r--r-- | inc/template.php | 6 |
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'] .= |
