refactor isSeedBox judgement

This commit is contained in:
xiaomlove
2025-05-11 02:33:22 +07:00
parent 6ff9d70ebc
commit 4b39d708d2
32 changed files with 1030 additions and 233 deletions

View File

@@ -2812,7 +2812,7 @@ if ($msgalert)
//seed box approval
if (get_user_class() >= \App\Models\User::CLASS_ADMINISTRATOR && get_setting('seed_box.enabled') == 'yes') {
$cacheKey = 'SEED_BOX_RECORD_APPROVAL_NONE';
$cacheKey = \App\Repositories\SeedBoxRepository::APPROVAL_COUNT_CACHE_KEY;
$toApprovalCounts = $Cache->get_value($cacheKey);
if ($toApprovalCounts === false) {
$toApprovalCounts = get_row_count('seed_box_records', 'where status = 0');