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)) {
|
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']);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -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 %}
|
||||||
>
|
>
|
||||||
|
@ -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 %}
|
||||||
|
Loading…
Reference in New Issue
Block a user