|
|
@ -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(); |
|
|
@ -51,6 +51,8 @@ function Element($templateFile, array $options) { |
|
|
|
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'] .= |
|
|
|