mirror of
https://github.com/smarty-php/smarty.git
synced 2025-10-17 22:45:20 +02:00
Fixup some naming.
This commit is contained in:
@@ -8,22 +8,21 @@
|
||||
* Purpose: assign a value to a template variable
|
||||
* -------------------------------------------------------------
|
||||
*/
|
||||
function smarty_function_assign($args, &$smarty_obj)
|
||||
function smarty_function_assign($params, &$smarty)
|
||||
{
|
||||
extract($args);
|
||||
extract($params);
|
||||
|
||||
if (empty($var)) {
|
||||
$smarty_obj->_trigger_error_msg("assign: missing 'var' parameter");
|
||||
$smarty->trigger_error("assign: missing 'var' parameter");
|
||||
return;
|
||||
}
|
||||
|
||||
if (!in_array('value', array_keys($args))) {
|
||||
$smarty_obj->_trigger_error_msg("assign: missing 'value' parameter");
|
||||
if (!in_array('value', array_keys($params))) {
|
||||
$smarty->trigger_error("assign: missing 'value' parameter");
|
||||
return;
|
||||
}
|
||||
|
||||
$smarty_obj->assign($var, $value);
|
||||
return true;
|
||||
$smarty->assign($var, $value);
|
||||
}
|
||||
|
||||
/* vim: set expandtab: */
|
||||
|
Reference in New Issue
Block a user