X-Git-Url: http://git.harvie.cz/?a=blobdiff_plain;ds=sidebyside;f=inc%2Fsmarty%2Fplugins%2Fshared.make_timestamp.php;fp=inc%2Fsmarty%2Fplugins%2Fshared.make_timestamp.php;h=0000000000000000000000000000000000000000;hb=b42b2bf946332ad8544d53f610be9cb05e80bf56;hp=c6520374ecf3fba3f16390e4849d26f01b10a667;hpb=e586807dafc64c3fe152ab518599e6cf3f0f84e1;p=mirrors%2FKyberia-bloodline.git diff --git a/inc/smarty/plugins/shared.make_timestamp.php b/inc/smarty/plugins/shared.make_timestamp.php deleted file mode 100644 index c652037..0000000 --- a/inc/smarty/plugins/shared.make_timestamp.php +++ /dev/null @@ -1,43 +0,0 @@ - - * Purpose: used by other smarty functions to make a timestamp - * from a string. - * @param string - * @return string - */ -function smarty_make_timestamp($string) -{ - if(empty($string)) { - $string = "now"; - } - $time = strtotime($string); - if (is_numeric($time) && $time != -1) - return $time; - - // is mysql timestamp format of YYYYMMDDHHMMSS? - if (is_numeric($string) && strlen($string) == 14) { - $time = mktime(substr($string,8,2),substr($string,10,2),substr($string,12,2), - substr($string,4,2),substr($string,6,2),substr($string,0,4)); - - return $time; - } - - // couldn't recognize it, try to return a time - $time = (int) $string; - if ($time > 0) - return $time; - else - return time(); -} - -/* vim: set expandtab: */ - -?>