mirror of
https://github.com/smarty-php/smarty.git
synced 2025-08-05 19:04:27 +02: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:
@@ -1,4 +1,8 @@
|
||||
===== trunk =====
|
||||
25.11.2011
|
||||
- bugfix {html_select_date} and {html_slecet_time} did not default to current time if "time" was not specified
|
||||
since r4432 (issue 60)
|
||||
|
||||
24.11.2011
|
||||
- bugfix a subtemplate later used as main template did use old variable values
|
||||
|
||||
|
@@ -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));
|
||||
}
|
||||
|
@@ -180,8 +180,11 @@ function smarty_function_html_select_time($params, $template)
|
||||
list($_year, $_month, $_day) = $time = explode('-', date('Y-m-d'));
|
||||
}
|
||||
} elseif ($time === null) {
|
||||
//list($_hour, $_minute, $_second) = $time = explode('-', date('H-i-s'));
|
||||
$_hour = $_minute = $_second = $time = null;
|
||||
if (array_key_exists('time', $params)) {
|
||||
$_hour = $_minute = $_second = $time = null;
|
||||
} else {
|
||||
list($_hour, $_minute, $_second) = $time = explode('-', date('H-i-s'));
|
||||
}
|
||||
} else {
|
||||
list($_hour, $_minute, $_second) = $time = explode('-', date('H-i-s', $time));
|
||||
}
|
||||
|
Reference in New Issue
Block a user