fixed handling of selected month html_select_date

thanks to Yuri Weseman for providing problem+solution
This commit is contained in:
messju
2005-04-07 18:06:21 +00:00
parent 27812045a9
commit 04a503f2cf
2 changed files with 3 additions and 1 deletions

2
NEWS
View File

@@ -1,3 +1,5 @@
- fix handling of selected month html_select_date (Yuri Weseman, messju)
Version 2.6.9 (Mar 31, 2005) Version 2.6.9 (Mar 31, 2005)
---------------------------- ----------------------------

View File

@@ -198,7 +198,7 @@ function smarty_function_html_select_date($params, &$smarty)
$month_result .= smarty_function_html_options(array('output' => $month_names, $month_result .= smarty_function_html_options(array('output' => $month_names,
'values' => $month_values, 'values' => $month_values,
'selected' => $a=$time[1] ? strftime($month_value_format, mktime(0, 0, 0, (int)$time[1], 1, 2000)) : '', 'selected' => (int)$time[1] ? strftime($month_value_format, mktime(0, 0, 0, (int)$time[1], 1, 2000)) : '',
'print_result' => false), 'print_result' => false),
$smarty); $smarty);
$month_result .= '</select>'; $month_result .= '</select>';