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

View File

@@ -198,7 +198,7 @@ function smarty_function_html_select_date($params, &$smarty)
$month_result .= smarty_function_html_options(array('output' => $month_names,
'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),
$smarty);
$month_result .= '</select>';