Revert "Use the BSTemplate::$preParseHook for global templates"
authorRobert Sesek <rsesek@bluestatic.org>
Thu, 26 Jun 2008 14:34:21 +0000 (10:34 -0400)
committerRobert Sesek <rsesek@bluestatic.org>
Thu, 26 Jun 2008 14:34:21 +0000 (10:34 -0400)
This reverts commit 613803ed652937a8623c78cb298ca699a0211823.

global.php
includes/functions.php

index a8c19ca18eca2f69343f64e92d6a2f956c112791..76fcbbf846dc8d8653e79d6bfcfe45647bd3f746 100755 (executable)
@@ -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();
 }
 
 // ###################################################################
index aec184aa625f9b53700ddadcf3008953314ca44a..e2f643b50c6de4094a79579dcf66da638bd42617 100755 (executable)
@@ -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;
 }