allowed "_" in the name of variable-parameters to {math}-function

This commit is contained in:
messju
2003-04-06 12:24:46 +00:00
parent 60df40a589
commit b9957a6845

View File

@@ -25,7 +25,7 @@ function smarty_function_math($params, &$smarty)
} }
// match all vars in equation, make sure all are passed // match all vars in equation, make sure all are passed
preg_match_all("![a-zA-Z][a-zA-Z0-9]*!",$equation, $match); preg_match_all("![a-zA-Z][a-zA-Z0-9_]*!",$equation, $match);
$allowed_funcs = array('int','abs','ceil','cos','exp','floor','log','log10', $allowed_funcs = array('int','abs','ceil','cos','exp','floor','log','log10',
'max','min','pi','pow','rand','round','sin','sqrt','srand','tan'); 'max','min','pi','pow','rand','round','sin','sqrt','srand','tan');