Ignored nonactive posts from valid posts checking list
This commit is contained in:
@@ -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)) {
|
||||
|
||||
Reference in New Issue
Block a user