fixed bug in smarty_make_timestamp introduced in PHP 4.1.0

This commit is contained in:
mohrt
2001-12-14 15:38:03 +00:00
parent cf0ee547f1
commit 46b0a6caea
2 changed files with 5 additions and 1 deletions

1
NEWS
View File

@@ -1,3 +1,4 @@
- fixed bug in smarty_make_timestamp introduced in PHP 4.1.0 (Monte)
- fixed bug with cached insert debug timing (Monte)
- added 'script' attribute to {insert..} which specifies the script that
the insert function can be found in. (Andrei)

View File

@@ -113,6 +113,9 @@ function smarty_mod_date_format($string, $format="%b %e, %Y")
\*======================================================================*/
function smarty_make_timestamp($string)
{
if(empty($string)) {
$string = "now";
}
$time = strtotime($string);
if (is_numeric($time) && $time != -1)
return $time;
@@ -125,7 +128,7 @@ function smarty_make_timestamp($string)
return $time;
}
// can decipher, must be timestamp already?
// can't decipher, just return it
return $string;
}