From e11b8c6d7a92279cfafba2cc29363a4831cf4a1f Mon Sep 17 00:00:00 2001 From: "monte.ohrt" Date: Sat, 16 May 2009 23:27:22 +0000 Subject: [PATCH] rename supers to _supers --- libs/Smarty.class.php | 22 +++++++++++++++------- libs/Smarty_Compiler.class.php | 14 +++++++------- 2 files changed, 22 insertions(+), 14 deletions(-) diff --git a/libs/Smarty.class.php b/libs/Smarty.class.php index 8b7bcbc7..1b35d90b 100644 --- a/libs/Smarty.class.php +++ b/libs/Smarty.class.php @@ -562,6 +562,14 @@ class Smarty */ var $_cache_including = false; + /** + * array of super globals internally + * + * @var array + */ + var $_supers = array(); + + /**#@-*/ /** * The class constructor. @@ -571,13 +579,13 @@ class Smarty $this->assign('SCRIPT_NAME', isset($_SERVER['SCRIPT_NAME']) ? $_SERVER['SCRIPT_NAME'] : @$GLOBALS['HTTP_SERVER_VARS']['SCRIPT_NAME']); - $this->supers['get'] = $this->request_use_auto_globals ? $_GET : $GLOBALS['HTTP_GET_VARS']; - $this->supers['post'] = $this->request_use_auto_globals ? $_POST : $GLOBALS['HTTP_POST_VARS']; - $this->supers['server'] = $this->request_use_auto_globals ? $_SERVER : $GLOBALS['HTTP_SERVER_VARS']; - $this->supers['session'] = $this->request_use_auto_globals ? $_SESSION : $GLOBALS['HTTP_SESSION_VARS']; - $this->supers['request'] = $this->request_use_auto_globals ? $_REQUEST : $GLOBALS['HTTP_REQUEST_VARS']; - $this->supers['cookies'] = $this->request_use_auto_globals ? $_COOKIE : $GLOBALS['HTTP_COOKIE_VARS']; - $this->supers['env'] = $this->request_use_auto_globals ? $_ENV : $GLOBALS['HTTP_ENV_VARS']; + $this->_supers['get'] = $this->request_use_auto_globals ? $_GET : $GLOBALS['HTTP_GET_VARS']; + $this->_supers['post'] = $this->request_use_auto_globals ? $_POST : $GLOBALS['HTTP_POST_VARS']; + $this->_supers['server'] = $this->request_use_auto_globals ? $_SERVER : $GLOBALS['HTTP_SERVER_VARS']; + $this->_supers['session'] = $this->request_use_auto_globals ? $_SESSION : $GLOBALS['HTTP_SESSION_VARS']; + $this->_supers['request'] = $this->request_use_auto_globals ? $_REQUEST : $GLOBALS['HTTP_REQUEST_VARS']; + $this->_supers['cookies'] = $this->request_use_auto_globals ? $_COOKIE : $GLOBALS['HTTP_COOKIE_VARS']; + $this->_supers['env'] = $this->request_use_auto_globals ? $_ENV : $GLOBALS['HTTP_ENV_VARS']; } diff --git a/libs/Smarty_Compiler.class.php b/libs/Smarty_Compiler.class.php index 57e4f779..8b4cea73 100644 --- a/libs/Smarty_Compiler.class.php +++ b/libs/Smarty_Compiler.class.php @@ -2047,27 +2047,27 @@ class Smarty_Compiler extends Smarty { break; case 'get': - $compiled_ref = "\$this->supers['get']"; + $compiled_ref = "\$this->_supers['get']"; break; case 'post': - $compiled_ref = "\$this->supers['post']"; + $compiled_ref = "\$this->_supers['post']"; break; case 'cookies': - $compiled_ref = "\$this->supers['cookies']"; + $compiled_ref = "\$this->_supers['cookies']"; break; case 'env': - $compiled_ref = "\$this->supers['env']"; + $compiled_ref = "\$this->_supers['env']"; break; case 'server': - $compiled_ref = "\$this->supers['server']"; + $compiled_ref = "\$this->_supers['server']"; break; case 'session': - $compiled_ref = "\$this->supers['session']"; + $compiled_ref = "\$this->_supers['session']"; break; /* @@ -2076,7 +2076,7 @@ class Smarty_Compiler extends Smarty { */ case 'request': if ($this->request_use_auto_globals) { - $compiled_ref = "\$this->supers['request']"; + $compiled_ref = "\$this->_supers['request']"; break; } else { $this->_init_smarty_vars = true;