mirror of
https://github.com/smarty-php/smarty.git
synced 2025-08-04 18:34:27 +02:00
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:
@@ -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.
|
||||
|
||||
|
@@ -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;
|
||||
}
|
||||
|
@@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user