Nonactivate a post manually causes its status changed to 3 which cannot be edited and its status cannot be changed.
This commit is contained in:
@@ -27,7 +27,8 @@ class Posts
|
||||
$table = 'pengumuman';
|
||||
|
||||
$valid = $this->post->showAll([
|
||||
['valid_at', '<=', $now]
|
||||
['valid_at', '<=', $now],
|
||||
['status', '!=', 3]
|
||||
]);
|
||||
if ($valid !== false) {
|
||||
foreach ($valid as $fields) {
|
||||
@@ -38,7 +39,8 @@ class Posts
|
||||
}
|
||||
|
||||
$not_valid = $this->post->showAll([
|
||||
['valid_at', '>', $now]
|
||||
['valid_at', '>', $now],
|
||||
['status', '!=', 3]
|
||||
]);
|
||||
if ($not_valid !== false) {
|
||||
foreach ($not_valid as $fields) {
|
||||
@@ -49,7 +51,8 @@ class Posts
|
||||
}
|
||||
|
||||
$expired = $this->post->showAll([
|
||||
['expired_at', '<', $now]
|
||||
['expired_at', '<', $now],
|
||||
['status', '!=', 3]
|
||||
]);
|
||||
if ($expired !== false) {
|
||||
foreach ($expired as $fields) {
|
||||
|
||||
@@ -101,7 +101,7 @@
|
||||
<br>
|
||||
|
||||
<button type="submit"
|
||||
{% if (post.status == 0 or editor_now != creator.id) %}
|
||||
{% if (post.status == 0 or post.status == 3 or editor_now != creator.id) %}
|
||||
disabled
|
||||
{% endif %}
|
||||
>
|
||||
|
||||
Reference in New Issue
Block a user