Commit 9749a55f by Seldaek

git-svn-id: svn://dwoo.org/dwoo/trunk@63 0598d79b-80c4-4d41-97ba-ac86fbbd088b

parent cfb65a97
[2008--] 0.9.1 [2008--] 0.9.1
+ Added {/} shortcut that closes the last opened block + Added {/} shortcut that closes the last opened block
* Optimized scope-handling functions, {loop} and {with} are now slightly faster * Optimized scope-handling functions, {loop} and {with} are now slightly faster
* Fixed a bug in {date_format} that prevented anything but unix timestamps to
work
[2008-05-10] 0.9.0 [2008-05-10] 0.9.0
! BC Break: changed all class names to be PEAR compliant (aka use underscores ! BC Break: changed all class names to be PEAR compliant (aka use underscores
......
...@@ -23,13 +23,13 @@ function Dwoo_Plugin_date_format(Dwoo $dwoo, $value, $format='%b %e, %Y', $defau ...@@ -23,13 +23,13 @@ function Dwoo_Plugin_date_format(Dwoo $dwoo, $value, $format='%b %e, %Y', $defau
{ {
if(!empty($value)) if(!empty($value))
{ {
// don't convert if it's a valid unix timestamp // convert if it's not a valid unix timestamp
if(preg_match('#^\d{10}$#', $value)===0) if(preg_match('#^\d{10}$#', $value)===0)
$value = strtotime($value); $value = strtotime($value);
} }
elseif(!empty($default)) elseif(!empty($default))
{ {
// don't convert if it's a valid unix timestamp // convert if it's not a valid unix timestamp
if(preg_match('#^\d{10}$#', $default)===0) if(preg_match('#^\d{10}$#', $default)===0)
$value = strtotime($default); $value = strtotime($default);
else else
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment