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
if ((int) $time > 0)
return (int) $time;
$time = (int) $string;
if ($time > 0)
return $time;
else
return time();
}

View File

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