get rid of testing for a set value with assign function, just set to whatever is passed into the template

This commit is contained in:
mohrt
2002-11-21 15:12:12 +00:00
parent 2f5e0df71f
commit d4f95ceee5
3 changed files with 7 additions and 7 deletions

View File

@@ -4,7 +4,7 @@
The mtime on compiled files will now match the source files, in the case where
the source file may not get the current timestamp, recompiling will still work
as expected. Proper support for open_basedir has been added, so Smarty should
work correctly in safe mode. Added a few new features such as formattext block
work correctly in safe mode. Added a few new features such as textformat block
function, strip variable modifier and optgroup support for html_options. Also
other minor bug fixes, see the Change Log.

View File

@@ -229,12 +229,12 @@ class Smarty
{
if (is_array($tpl_var)){
foreach ($tpl_var as $key => $val) {
if ($key != '' && isset($val)) {
if ($key != '') {
$this->_tpl_vars[$key] = $val;
}
}
} else {
if ($tpl_var != '' && isset($value))
if ($tpl_var != '')
$this->_tpl_vars[$tpl_var] = $value;
}
$this->_extract = true;
@@ -246,7 +246,7 @@ class Smarty
\*======================================================================*/
function assign_by_ref($tpl_var, &$value)
{
if ($tpl_var != '' && isset($value))
if ($tpl_var != '')
$this->_tpl_vars[$tpl_var] = &$value;
$this->_extract = true;
}

View File

@@ -229,12 +229,12 @@ class Smarty
{
if (is_array($tpl_var)){
foreach ($tpl_var as $key => $val) {
if ($key != '' && isset($val)) {
if ($key != '') {
$this->_tpl_vars[$key] = $val;
}
}
} else {
if ($tpl_var != '' && isset($value))
if ($tpl_var != '')
$this->_tpl_vars[$tpl_var] = $value;
}
$this->_extract = true;
@@ -246,7 +246,7 @@ class Smarty
\*======================================================================*/
function assign_by_ref($tpl_var, &$value)
{
if ($tpl_var != '' && isset($value))
if ($tpl_var != '')
$this->_tpl_vars[$tpl_var] = &$value;
$this->_extract = true;
}