From 7fd25a7d3575c41051430d4611278d22cc6a98cd Mon Sep 17 00:00:00 2001 From: Robert Sesek Date: Thu, 26 Jun 2008 10:26:10 -0400 Subject: [PATCH] We were hitting an infinite loop with isso_pre_parse_hook * includes/functions.php: (isso_pre_parse_hook) --- includes/functions.php | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/includes/functions.php b/includes/functions.php index aec184a..3a46bf9 100755 --- a/includes/functions.php +++ b/includes/functions.php @@ -537,14 +537,18 @@ function fetch_on_bits($mask, $userinfo = null) // the pre-parse hook for ISSO's template engine function isso_pre_parse_hook($template, $obj) { - $globals = array( - 'header' => BSTemplate::fetch('header')->evaluate(), - 'doctype' => BSTemplate::fetch('doctype')->evaluate(), - 'headinclude' => BSTemplate::fetch('headinclude')->evaluate(), - 'footer' => BSTemplate::fetch('footer')->evaluate() - ); + static $gotGlobals = false; - print_r($globals); + if (!$gotGlobals) + { + $gotGlobals = true; + $globals = array( + 'header' => BSTemplate::fetch('header')->evaluate(), + 'doctype' => BSTemplate::fetch('doctype')->evaluate(), + 'headinclude' => BSTemplate::fetch('headinclude')->evaluate(), + 'footer' => BSTemplate::fetch('footer')->evaluate() + ); + } $obj->vars = array_merge($globals, $obj->vars); -- 2.22.5