From d32898fb08d9f1eb0eb72100340cd2e4f9c2e6a8 Mon Sep 17 00:00:00 2001 From: andrey Date: Fri, 16 Mar 2001 15:59:31 +0000 Subject: [PATCH] making config variables global for now. --- Smarty_Compiler.class.php | 6 +++--- libs/Smarty_Compiler.class.php | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Smarty_Compiler.class.php b/Smarty_Compiler.class.php index 8c730cd9..13382efc 100644 --- a/Smarty_Compiler.class.php +++ b/Smarty_Compiler.class.php @@ -401,10 +401,10 @@ class Smarty_Compiler extends Smarty { "if (!is_object(\$GLOBALS['_smarty_conf_obj']) || get_class(\$GLOBALS['_smarty_conf_obj']) != 'config_file') {\n" . " \$GLOBALS['_smarty_conf_obj'] = new Config_File('".$this->config_dir."');\n" . "}\n" . - "\$_smarty_config = array_merge((array)\$_smarty_config, \$GLOBALS['_smarty_conf_obj']->get(".$attrs['file']."));\n"; + "\$GLOBALS['_smarty_config'] = array_merge((array)\$GLOBALS['_smarty_config'], \$GLOBALS['_smarty_conf_obj']->get(".$attrs['file']."));\n"; if (!empty($attrs['section'])) - $output .= '$_smarty_config = array_merge((array)$_smarty_config, $GLOBALS[\'_smarty_conf_obj\']->get('.$attrs['file'].', '.$attrs['section'].')); '; + $output .= '$GLOBALS[\'_smarty_config\'] = array_merge((array)$GLOBALS[\'_smarty_config\'], $GLOBALS[\'_smarty_conf_obj\']->get('.$attrs['file'].', '.$attrs['section'].')); '; $output .= '?>'; @@ -841,7 +841,7 @@ class Smarty_Compiler extends Smarty { $var_name = substr($var_ref, 1, -1); - $output = "\$_smarty_config['$var_name']"; + $output = "\$GLOBALS['_smarty_config']['$var_name']"; $this->_parse_modifiers($output, $modifiers); diff --git a/libs/Smarty_Compiler.class.php b/libs/Smarty_Compiler.class.php index 8c730cd9..13382efc 100644 --- a/libs/Smarty_Compiler.class.php +++ b/libs/Smarty_Compiler.class.php @@ -401,10 +401,10 @@ class Smarty_Compiler extends Smarty { "if (!is_object(\$GLOBALS['_smarty_conf_obj']) || get_class(\$GLOBALS['_smarty_conf_obj']) != 'config_file') {\n" . " \$GLOBALS['_smarty_conf_obj'] = new Config_File('".$this->config_dir."');\n" . "}\n" . - "\$_smarty_config = array_merge((array)\$_smarty_config, \$GLOBALS['_smarty_conf_obj']->get(".$attrs['file']."));\n"; + "\$GLOBALS['_smarty_config'] = array_merge((array)\$GLOBALS['_smarty_config'], \$GLOBALS['_smarty_conf_obj']->get(".$attrs['file']."));\n"; if (!empty($attrs['section'])) - $output .= '$_smarty_config = array_merge((array)$_smarty_config, $GLOBALS[\'_smarty_conf_obj\']->get('.$attrs['file'].', '.$attrs['section'].')); '; + $output .= '$GLOBALS[\'_smarty_config\'] = array_merge((array)$GLOBALS[\'_smarty_config\'], $GLOBALS[\'_smarty_conf_obj\']->get('.$attrs['file'].', '.$attrs['section'].')); '; $output .= '?>'; @@ -841,7 +841,7 @@ class Smarty_Compiler extends Smarty { $var_name = substr($var_ref, 1, -1); - $output = "\$_smarty_config['$var_name']"; + $output = "\$GLOBALS['_smarty_config']['$var_name']"; $this->_parse_modifiers($output, $modifiers);