From e57104198b4085fad329b70213fcc34702b452eb Mon Sep 17 00:00:00 2001 From: Gregorio Chiko Putra Date: Sat, 16 Sep 2017 13:10:56 +0700 Subject: [PATCH] Fixed update posts error --- App/Controllers/Posts.php | 1 + App/Views/Data/pengumuman.html | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/App/Controllers/Posts.php b/App/Controllers/Posts.php index c2bb131..c028373 100644 --- a/App/Controllers/Posts.php +++ b/App/Controllers/Posts.php @@ -329,6 +329,7 @@ class Posts foreach ($args as $key => $val) { if (strpos($val, "##date##") !== false) { $date = new \DateTime(); + $now = $date->format("Y-m-d"); $args[$key] = $now; } } diff --git a/App/Views/Data/pengumuman.html b/App/Views/Data/pengumuman.html index 270d396..9324041 100644 --- a/App/Views/Data/pengumuman.html +++ b/App/Views/Data/pengumuman.html @@ -60,7 +60,7 @@
[{{ post.valid_at|date("d/m/Y") }} - {{ post.expired_at|date("d/m/Y") }}] {{ post.content|rendermd }} -
+