From e0505bdaad56017a46056ec6bc0121ecf7973795 Mon Sep 17 00:00:00 2001 From: mohrt Date: Tue, 18 Jun 2002 18:20:01 +0000 Subject: [PATCH] gave $reset a default value in cycle function --- NEWS | 1 + libs/plugins/function.cycle.php | 6 +++++- plugins/function.cycle.php | 6 +++++- 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/NEWS b/NEWS index d780ad08..577800c0 100644 --- a/NEWS +++ b/NEWS @@ -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) diff --git a/libs/plugins/function.cycle.php b/libs/plugins/function.cycle.php index ca2d099f..90dc3cfe 100644 --- a/libs/plugins/function.cycle.php +++ b/libs/plugins/function.cycle.php @@ -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"); diff --git a/plugins/function.cycle.php b/plugins/function.cycle.php index ca2d099f..90dc3cfe 100644 --- a/plugins/function.cycle.php +++ b/plugins/function.cycle.php @@ -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");