diff --git a/NEWS b/NEWS index 74b2a8ca..26cc814c 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,5 @@ + - remove {$SCRIPT_NAME}. use {$smarty.server.SCRIPT_NAME} instead (messju) + - remove $global_assign. assign global variables explicitly instead (messju) - remove warning in debug_print_var on php-resources (messju) - move function.assign.php to compiler.assign.php (messju) - add property $tpl_error_reporting (messju) diff --git a/libs/Smarty.class.php b/libs/Smarty.class.php index 28b969c2..6432e903 100644 --- a/libs/Smarty.class.php +++ b/libs/Smarty.class.php @@ -339,16 +339,6 @@ class Smarty */ var $cache_handler_func = null; - /** - * These are the variables from the globals array that are - * assigned to all templates automatically. This isn't really - * necessary any more, you can use the $smarty var to access them - * directly. - * - * @var array - */ - var $global_assign = array('HTTP_SERVER_VARS' => array('SCRIPT_NAME')); - /** * This indicates which filters are automatically loaded into Smarty. * @@ -590,32 +580,11 @@ class Smarty /**#@-*/ /** * The class constructor. - * - * @uses $global_assign uses {@link assign()} to assign each corresponding - * value from $GLOBALS to the template vars */ function Smarty() { - foreach ($this->global_assign as $key => $var_name) { - if (is_array($var_name)) { - foreach ($var_name as $var) { - if (isset($GLOBALS[$key][$var])) { - $this->assign($var, $GLOBALS[$key][$var]); - } else { - $this->assign($var, null); - } - } - } else { - if (isset($GLOBALS[$var_name])) { - $this->assign($var_name, $GLOBALS[$var_name]); - } else { - $this->assign($var_name, null); - } - } - } } - /** * assigns values to template variables *