From 3a36e0282cd20c1b91a8f193841f43ebfc950d52 Mon Sep 17 00:00:00 2001 From: mohrt Date: Sun, 23 Jun 2002 22:37:21 +0000 Subject: [PATCH] update timestamp plugin to work when passed a timestamp --- libs/plugins/shared.make_timestamp.php | 5 +++-- plugins/shared.make_timestamp.php | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/libs/plugins/shared.make_timestamp.php b/libs/plugins/shared.make_timestamp.php index fb43ba08..2154b772 100644 --- a/libs/plugins/shared.make_timestamp.php +++ b/libs/plugins/shared.make_timestamp.php @@ -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(); } diff --git a/plugins/shared.make_timestamp.php b/plugins/shared.make_timestamp.php index fb43ba08..2154b772 100644 --- a/plugins/shared.make_timestamp.php +++ b/plugins/shared.make_timestamp.php @@ -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(); }