cvs: smarty / NEWS /libs/plugins function.html_select_date.php
"Messju Mohr" <[email protected]>
| Newsgroups | gmane.comp.php.cvs.smarty |
|---|---|
| Message-ID | <cvsmessju1071653550@cvsserver> |
messju Wed Dec 17 04:32:30 2003 EDT
Modified files:
/smarty NEWS
/smarty/libs/plugins function.html_select_date.php
Log:
allow single-digit days and months without smarty_make_timestamp()
this makes dates like "1968-11-6" work correctly since no strtotime()
is involved
add warning when unknown parameter is passed
Index: smarty/NEWS
diff -u smarty/NEWS:1.417 smarty/NEWS:1.418
--- smarty/NEWS:1.417 Tue Dec 16 04:05:04 2003
+++ smarty/NEWS Wed Dec 17 04:32:29 2003
@@ -1,3 +1,5 @@
+ - allow single-digit days and months without smarty_make_timestamp()
+ in html_select_date (messju)
- fix headers sent erroneously with cache_modified_check and fetch()
(wphilips, messju)
- fix config_file path bug (Marc Cabadas, Monte)
Index: smarty/libs/plugins/function.html_select_date.php
diff -u smarty/libs/plugins/function.html_select_date.php:1.19 smarty/libs/plugins/function.html_select_date.php:1.20
--- smarty/libs/plugins/function.html_select_date.php:1.19 Wed Dec 10 11:43:39 2003
+++ smarty/libs/plugins/function.html_select_date.php Wed Dec 17 04:32:30 2003
@@ -115,11 +115,15 @@
case 'reverse_years':
$$_key = (bool)$_value;
break;
+
+ default:
+ $smarty->trigger_error("[html_select_time] unknown parameter $_key", E_USER_WARNING);
+
}
}
// If $time is not in format yyyy-mm-dd
- if (!preg_match('/^\d{4}-\d{2}-\d{2}$/', $time) && $time!='--') {
+ if (!preg_match('/^\d{4}-\d{1,2}-\d{1,2}$/', $time) && $time!='--') {
// then $time is empty or unix timestamp or mysql timestamp
// using smarty_make_timestamp to get an unix timestamp and
// strftime to make yyyy-mm-dd
--
Smarty CVS Mailing List (http://cvs.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php