From 356ba459af29b0351e2cbb2e0b2ca98d42550f2a Mon Sep 17 00:00:00 2001 From: Robert Sesek Date: Thu, 26 Jun 2008 10:34:21 -0400 Subject: [PATCH] Revert "Use the BSTemplate::$preParseHook for global templates" This reverts commit 613803ed652937a8623c78cb298ca699a0211823. --- global.php | 5 +++++ includes/functions.php | 13 +------------ 2 files changed, 6 insertions(+), 12 deletions(-) diff --git a/global.php b/global.php index a8c19ca..76fcbbf 100755 --- a/global.php +++ b/global.php @@ -70,6 +70,11 @@ if (!(defined('NO_TEMPLATES') AND constant('NO_TEMPLATES') == true)) BSTemplate::cache(array_merge($globaltemplates, (array)$fetchtemplates)); BSApp::debug('time for tpl cache: ' . BSFunctions::fetch_microtime_diff($start)); + + $header = BSTemplate::fetch('header')->evaluate(); + $doctype = BSTemplate::fetch('doctype')->evaluate(); + $headinclude = BSTemplate::fetch('headinclude')->evaluate(); + $footer = BSTemplate::fetch('footer')->evaluate(); } // ################################################################### diff --git a/includes/functions.php b/includes/functions.php index aec184a..e2f643b 100755 --- a/includes/functions.php +++ b/includes/functions.php @@ -535,19 +535,8 @@ function fetch_on_bits($mask, $userinfo = null) // #################### Start isso_pre_parse_hook #################### // the pre-parse hook for ISSO's template engine -function isso_pre_parse_hook($template, $obj) +function isso_pre_parse_hook($template) { - $globals = array( - 'header' => BSTemplate::fetch('header')->evaluate(), - 'doctype' => BSTemplate::fetch('doctype')->evaluate(), - 'headinclude' => BSTemplate::fetch('headinclude')->evaluate(), - 'footer' => BSTemplate::fetch('footer')->evaluate() - ); - - print_r($globals); - - $obj->vars = array_merge($globals, $obj->vars); - $template = preg_replace('#\$help\[(.*)\]#', '" . fetch_help_link("\1") . "', $template); return $template; } -- 2.22.5