update timestamp plugin to work when passed a timestamp

This commit is contained in:
mohrt
2002-06-23 22:37:21 +00:00
parent a33e8c3172
commit 3a36e0282c
2 changed files with 6 additions and 4 deletions

View File

@@ -23,8 +23,9 @@ function smarty_make_timestamp($string)
} }
// couldn't recognize it, try to return a time // couldn't recognize it, try to return a time
if ((int) $time > 0) $time = (int) $string;
return (int) $time; if ($time > 0)
return $time;
else else
return time(); return time();
} }

View File

@@ -23,8 +23,9 @@ function smarty_make_timestamp($string)
} }
// couldn't recognize it, try to return a time // couldn't recognize it, try to return a time
if ((int) $time > 0) $time = (int) $string;
return (int) $time; if ($time > 0)
return $time;
else else
return time(); return time();
} }