mirror of
https://github.com/smarty-php/smarty.git
synced 2026-02-03 22:05:33 +01:00
- bugfix {html_select_date} and {html_slecet_time} did not default to current time if "time" was not specified
since r4432 (issue 60)
This commit is contained in:
@@ -202,8 +202,11 @@ function smarty_function_html_select_date($params, $template)
|
||||
list($_year, $_month, $_day) = $time = explode('-', date('Y-m-d'));
|
||||
}
|
||||
} elseif ($time === null) {
|
||||
//list($_year, $_month, $_day) = $time = explode('-', date('Y-m-d'));
|
||||
$_year = $_month = $_day = $time = null;
|
||||
if (array_key_exists('time', $params)) {
|
||||
$_year = $_month = $_day = $time = null;
|
||||
} else {
|
||||
list($_year, $_month, $_day) = $time = explode('-', date('Y-m-d'));
|
||||
}
|
||||
} else {
|
||||
list($_year, $_month, $_day) = $time = explode('-', date('Y-m-d', $time));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user