summaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
authorFrédéric Guillot <fguillot@users.noreply.github.com>2014-04-27 15:14:13 -0400
committerFrédéric Guillot <fguillot@users.noreply.github.com>2014-04-27 15:14:13 -0400
commit096b282a473fa2b27c3bfe3061f54b5fd83c75e0 (patch)
treefc358e47860c50ab8505e0666043d76196e48016 /core
parent6551609d1b248011d301080c1be7c48085dc5d55 (diff)
Add a basic task search
Diffstat (limited to 'core')
-rw-r--r--core/request.php5
-rw-r--r--core/translator.php4
2 files changed, 9 insertions, 0 deletions
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);
}