diff --git a/Smarty.addons.php b/Smarty.addons.php index 04bc3a03..47c32a29 100644 --- a/Smarty.addons.php +++ b/Smarty.addons.php @@ -309,7 +309,8 @@ function smarty_func_html_select_time() $display_hours = true; $display_minutes = true; $display_seconds = true; - $display_24_hours = true; + $display_meridian = true; + $use_24_hours = true; $minute_interval = 1; $second_interval = 1; @@ -318,8 +319,8 @@ function smarty_func_html_select_time() $html_result = ''; if ($display_hours) { - $hours = $display_24_hours ? range(0, 23) : range(1, 12); - $hour_fmt = $display_24_hors ? '%H' : '%I'; + $hours = $use_24_hours ? range(0, 23) : range(1, 12); + $hour_fmt = $use_24_hours ? '%H' : '%I'; for ($i = 0; $i < count($hours); $i++) $hours[$i] = sprintf('%02d', $hours[$i]); $html_result .= '\n"; } - if (!$display_24_hours) { + if ($display_meridian && !$use_24_hours) { $html_result .= '