forked from leftypol/leftypol
Minor $config['try_smarter'] work
This commit is contained in:
parent
7b817eea11
commit
a8e3754375
3 changed files with 8 additions and 3 deletions
|
@ -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'] .=
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue