Fixed update posts error
This commit is contained in:
parent
6cb980051c
commit
e57104198b
@ -329,6 +329,7 @@ class Posts
|
|||||||
foreach ($args as $key => $val) {
|
foreach ($args as $key => $val) {
|
||||||
if (strpos($val, "##date##") !== false) {
|
if (strpos($val, "##date##") !== false) {
|
||||||
$date = new \DateTime();
|
$date = new \DateTime();
|
||||||
|
$now = $date->format("Y-m-d");
|
||||||
$args[$key] = $now;
|
$args[$key] = $now;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -60,7 +60,7 @@
|
|||||||
<div class="fourth-900 half-600 card box" style="background-color:{{ post.background }};">
|
<div class="fourth-900 half-600 card box" style="background-color:{{ post.background }};">
|
||||||
<span class="stack" style="font-size:smaller;color:rgba(17,17,17,.4);margin-bottom:.6em;">[{{ post.valid_at|date("d/m/Y") }} - {{ post.expired_at|date("d/m/Y") }}]</span>
|
<span class="stack" style="font-size:smaller;color:rgba(17,17,17,.4);margin-bottom:.6em;">[{{ post.valid_at|date("d/m/Y") }} - {{ post.expired_at|date("d/m/Y") }}]</span>
|
||||||
<span class="stack" style="color:{{ post.foreground }};">{{ post.content|rendermd }}</span>
|
<span class="stack" style="color:{{ post.foreground }};">{{ post.content|rendermd }}</span>
|
||||||
<form method="post">
|
<form method="post" action="/">
|
||||||
<footer class="flex full grow">
|
<footer class="flex full grow">
|
||||||
{% if post.status != 0 %}
|
{% if post.status != 0 %}
|
||||||
<div class="half-900">
|
<div class="half-900">
|
||||||
|
Loading…
Reference in New Issue
Block a user