Smarty3
This commit is contained in:
@ -85,6 +85,20 @@ class serendipity_smarty_emulator {
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Assign one or multiple template variable by reference - Smarty API Change > 3.0
|
||||
*
|
||||
* @param string Variable name
|
||||
* @param mixed Referenced variable
|
||||
* @access public
|
||||
* @return null
|
||||
*/
|
||||
function assignByRef($tpl_var, &$value) {
|
||||
$GLOBALS['tpl'][$tpl_var] =& $value;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Assign one or multiple template variable by reference
|
||||
*
|
||||
@ -252,6 +266,26 @@ class serendipity_smarty_emulator_xml extends serendipity_smarty_emulator {
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Assign one or multiple template variable by reference - Smarty API Change > 3.0
|
||||
*
|
||||
* @param string Variable name
|
||||
* @param mixed Referenced variable
|
||||
* @access public
|
||||
* @return null
|
||||
*/
|
||||
function assignByRef($tpl_var, &$value) {
|
||||
if (is_array($value)) {
|
||||
foreach ($value as $key => $val) {
|
||||
$this->createXML($level, $key, $val);
|
||||
}
|
||||
} else {
|
||||
$this->createXML($level, $tpl_var, $value);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Assign one or multiple template variable by reference
|
||||
*
|
||||
|
Reference in New Issue
Block a user