mirror of
https://github.com/smarty-php/smarty.git
synced 2025-08-06 03:14:27 +02:00
rename supers to _supers
This commit is contained in:
@@ -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'];
|
||||
|
||||
}
|
||||
|
||||
|
@@ -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;
|
||||
|
Reference in New Issue
Block a user