mirror of
https://github.com/lkddi/nexusphp.git
synced 2026-04-24 12:07:23 +08:00
fix get_globao_sp_state
This commit is contained in:
@@ -10,11 +10,13 @@ function get_global_sp_state()
|
|||||||
\Nexus\Database\NexusDB::cache_put($cacheKey . '_deadline', $row['deadline'], 600);
|
\Nexus\Database\NexusDB::cache_put($cacheKey . '_deadline', $row['deadline'], 600);
|
||||||
return $row;
|
return $row;
|
||||||
});
|
});
|
||||||
if (isset($row['deadline']) && $row['deadline'] < date('Y-m-d H:i:s')) {
|
if (is_array($row) && isset($row['deadline']) && $row['deadline'] < date('Y-m-d H:i:s')) {
|
||||||
//expired
|
//expired
|
||||||
$global_promotion_state = \App\Models\Torrent::PROMOTION_NORMAL;
|
$global_promotion_state = \App\Models\Torrent::PROMOTION_NORMAL;
|
||||||
} else {
|
} elseif (is_array($row)) {
|
||||||
$global_promotion_state = $row["global_sp_state"];
|
$global_promotion_state = $row["global_sp_state"];
|
||||||
|
} else {
|
||||||
|
$global_promotion_state = $row;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return $global_promotion_state;
|
return $global_promotion_state;
|
||||||
|
|||||||
Reference in New Issue
Block a user