cvs: smarty / NEWS /libs Smarty.class.php
"Messju Mohr" <[email protected]>
| Newsgroups | gmane.comp.php.cvs.smarty |
|---|---|
| Message-ID | <cvsmessju1070443754@cvsserver> |
messju Wed Dec 3 04:29:14 2003 EDT
Modified files:
/smarty NEWS
/smarty/libs Smarty.class.php
Log:
remove $global_assign property from Smarty and $global_assign-handling
from the constructor. the only visible change is, that $SCRIPT_NAME is
not available in the tempates anymore. $smarty.server.SCRIPT_NAME has
to be used from now.
Index: smarty/NEWS
diff -u smarty/NEWS:1.409 smarty/NEWS:1.410
--- smarty/NEWS:1.409 Thu Nov 27 12:39:06 2003
+++ smarty/NEWS Wed Dec 3 04:29:12 2003
@@ -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)
Index: smarty/libs/Smarty.class.php
diff -u smarty/libs/Smarty.class.php:1.463 smarty/libs/Smarty.class.php:1.464
--- smarty/libs/Smarty.class.php:1.463 Tue Nov 25 04:02:48 2003
+++ smarty/libs/Smarty.class.php Wed Dec 3 04:29:13 2003
@@ -43,7 +43,7 @@
* @version 2.6.1-dev
*/
-/* $Id: Smarty.class.php,v 1.463 2003/11/25 09:02:48 messju Exp $ */
+/* $Id: Smarty.class.php,v 1.464 2003/12/03 09:29:13 messju Exp $ */
/**
* DIR_SEP isn't used anymore, but third party apps might
@@ -340,16 +340,6 @@
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.
*
* @var array array of filter names
@@ -590,32 +580,11 @@
/**#@-*/
/**
* 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
*
--
Smarty CVS Mailing List (http://cvs.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php