Ignored nonactive posts from valid posts checking list
This commit is contained in:
parent
472e66dc50
commit
8a3bb3408f
@ -27,7 +27,8 @@ class Posts
|
||||
$data = [];
|
||||
|
||||
$valid_data = $this->model->showAll([
|
||||
['valid_at', '<=', $now]
|
||||
['valid_at', '<=', $now],
|
||||
['status', '!=', 0]
|
||||
]);
|
||||
if ($valid_data != false) {
|
||||
if (array_key_exists(0, $valid_data)) {
|
||||
@ -45,7 +46,8 @@ class Posts
|
||||
}
|
||||
|
||||
$notvalid_data = $this->model->showAll([
|
||||
['valid_at', '>', $now]
|
||||
['valid_at', '>', $now],
|
||||
['status', '!=', 0]
|
||||
]);
|
||||
if ($notvalid_data != false) {
|
||||
if (array_key_exists(0, $notvalid_data)) {
|
||||
@ -63,7 +65,8 @@ class Posts
|
||||
}
|
||||
|
||||
$expired_data = $this->model->showAll([
|
||||
['expired_at', '<', $now]
|
||||
['expired_at', '<', $now],
|
||||
['status', '!=', 0]
|
||||
]);
|
||||
if ($expired_data != false) {
|
||||
if (array_key_exists(0, $expired_data)) {
|
||||
|
Loading…
Reference in New Issue
Block a user