Fix editor privilage issues
This commit is contained in:
parent
9296c7798e
commit
706b15d401
@ -39,7 +39,7 @@ class Posts
|
||||
|
||||
if ($not_valid = $this->post->showAll('valid_at', '>', $now)) {
|
||||
foreach ($not_valid as $value) {
|
||||
$this->post->update('pengumuman', ['status' => 0], $value['id']);
|
||||
$this->post->update('pengumuman', ['status' => 2], $value['id']);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -99,7 +99,7 @@
|
||||
<br>
|
||||
|
||||
<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
|
||||
{% endif %}
|
||||
>
|
||||
|
@ -13,7 +13,7 @@
|
||||
{% if post.status == 1 %}
|
||||
Edit
|
||||
</a>
|
||||
{% elseif post.status == 0 %}
|
||||
{% elseif (post.status == 0 or post.status == 2) %}
|
||||
<strike>Edit</strike>
|
||||
</a> (Nonaktif)
|
||||
{% endif %}
|
||||
|
Loading…
Reference in New Issue
Block a user