mirror of
https://github.com/smarty-php/smarty.git
synced 2025-08-05 02:44: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 =====
|
===== 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
|
24.11.2011
|
||||||
- bugfix a subtemplate later used as main template did use old variable values
|
- 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'));
|
list($_year, $_month, $_day) = $time = explode('-', date('Y-m-d'));
|
||||||
}
|
}
|
||||||
} elseif ($time === null) {
|
} elseif ($time === null) {
|
||||||
//list($_year, $_month, $_day) = $time = explode('-', date('Y-m-d'));
|
if (array_key_exists('time', $params)) {
|
||||||
$_year = $_month = $_day = $time = null;
|
$_year = $_month = $_day = $time = null;
|
||||||
|
} else {
|
||||||
|
list($_year, $_month, $_day) = $time = explode('-', date('Y-m-d'));
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
list($_year, $_month, $_day) = $time = explode('-', date('Y-m-d', $time));
|
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'));
|
list($_year, $_month, $_day) = $time = explode('-', date('Y-m-d'));
|
||||||
}
|
}
|
||||||
} elseif ($time === null) {
|
} elseif ($time === null) {
|
||||||
//list($_hour, $_minute, $_second) = $time = explode('-', date('H-i-s'));
|
if (array_key_exists('time', $params)) {
|
||||||
$_hour = $_minute = $_second = $time = null;
|
$_hour = $_minute = $_second = $time = null;
|
||||||
|
} else {
|
||||||
|
list($_hour, $_minute, $_second) = $time = explode('-', date('H-i-s'));
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
list($_hour, $_minute, $_second) = $time = explode('-', date('H-i-s', $time));
|
list($_hour, $_minute, $_second) = $time = explode('-', date('H-i-s', $time));
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user