gave $reset a default value in cycle function

This commit is contained in:
mohrt
2002-06-18 18:20:01 +00:00
parent 2fcb7baf53
commit e0505bdaad
3 changed files with 11 additions and 2 deletions

1
NEWS
View File

@@ -1,3 +1,4 @@
- gave $reset a default value in cycle plugin (Monte)
- fixed warnings with html_select_date and timestamp
functions (Monte)
- added support for sub directory exlusion format (Monte)

View File

@@ -46,7 +46,11 @@ function smarty_function_cycle($params, &$smarty)
if (!isset($advance)) {
$advance = true;
}
if (!isset($reset)) {
$reset = false;
}
if (!in_array('values', array_keys($params))) {
if(!isset($cycle_vars[$name]['values'])) {
$smarty->trigger_error("cycle: missing 'values' parameter");

View File

@@ -46,7 +46,11 @@ function smarty_function_cycle($params, &$smarty)
if (!isset($advance)) {
$advance = true;
}
if (!isset($reset)) {
$reset = false;
}
if (!in_array('values', array_keys($params))) {
if(!isset($cycle_vars[$name]['values'])) {
$smarty->trigger_error("cycle: missing 'values' parameter");