Fix editor privilage issues

This commit is contained in:
Gregorio Chiko Putra 2017-09-06 16:01:57 +07:00
parent 9296c7798e
commit 706b15d401
3 changed files with 3 additions and 3 deletions

View File

@ -39,7 +39,7 @@ class Posts
if ($not_valid = $this->post->showAll('valid_at', '>', $now)) { if ($not_valid = $this->post->showAll('valid_at', '>', $now)) {
foreach ($not_valid as $value) { foreach ($not_valid as $value) {
$this->post->update('pengumuman', ['status' => 0], $value['id']); $this->post->update('pengumuman', ['status' => 2], $value['id']);
} }
} }
} }

View File

@ -99,7 +99,7 @@
<br> <br>
<button type="submit" <button type="submit"
{% if (post.status == 0 and post.valid_at < timestamp or editor_now != creator.id) %} {% if (post.status == 0 or editor_now != creator.id) %}
disabled disabled
{% endif %} {% endif %}
> >

View File

@ -13,7 +13,7 @@
{% if post.status == 1 %} {% if post.status == 1 %}
Edit Edit
</a> </a>
{% elseif post.status == 0 %} {% elseif (post.status == 0 or post.status == 2) %}
<strike>Edit</strike> <strike>Edit</strike>
</a> (Nonaktif) </a> (Nonaktif)
{% endif %} {% endif %}