cvs: smarty /plugins function.html_select_date.php
| From: | Monte Ohrt | Date: | Mon, 15 Apr 2002 13:30:01 +0000 |
| Subject: | cvs: smarty /plugins function.html_select_date.php | ||
| Groups: | php.smarty.cvs | ||
| Request: | Send a blank email to php-smarty-cvs+get-55@lists.php.net to get a copy of this message | ||
mohrt Mon Apr 15 09:30:01 2002 EDT
Modified files:
/smarty/plugins function.html_select_date.php
Log:
fix regular expression for matching date
Index: smarty/plugins/function.html_select_date.php
diff -u smarty/plugins/function.html_select_date.php:1.7
smarty/plugins/function.html_select_date.php:1.8
--- smarty/plugins/function.html_select_date.php:1.7 Sat Apr 13 12:15:14 2002
+++ smarty/plugins/function.html_select_date.php Mon Apr 15 09:30:00 2002
@@ -56,7 +56,7 @@
extract($params);
// If $time is not in format yyyy-mm-dd
- if (!preg_match('/\d{4}-\d{2}-\d{2}/', $time)) {
+ if (!preg_match('/^\d{4}-\d{2}-\d{2}$/', $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