From 096b282a473fa2b27c3bfe3061f54b5fd83c75e0 Mon Sep 17 00:00:00 2001 From: Frédéric Guillot Date: Sun, 27 Apr 2014 15:14:13 -0400 Subject: Add a basic task search --- core/request.php | 5 +++++ core/translator.php | 4 ++++ 2 files changed, 9 insertions(+) (limited to 'core') diff --git a/core/request.php b/core/request.php index b2c3e12e..f2fa4d9f 100644 --- a/core/request.php +++ b/core/request.php @@ -43,4 +43,9 @@ class Request return ''; } + + public function isPost() + { + return isset($_SERVER['REQUEST_METHOD']) && $_SERVER['REQUEST_METHOD'] === 'POST'; + } } diff --git a/core/translator.php b/core/translator.php index 0f8c3d89..09480111 100644 --- a/core/translator.php +++ b/core/translator.php @@ -52,6 +52,10 @@ namespace Translator { function datetime($format, $timestamp) { + if (! $timestamp) { + return ''; + } + return strftime(get($format, $format), (int) $timestamp); } -- cgit v1.2.3