diff --git a/app/Http/Controllers/Api/ApiV1Controller.php b/app/Http/Controllers/Api/ApiV1Controller.php index 69b0e26b8..ddc02cdc4 100644 --- a/app/Http/Controllers/Api/ApiV1Controller.php +++ b/app/Http/Controllers/Api/ApiV1Controller.php @@ -1059,7 +1059,7 @@ class ApiV1Controller extends Controller $profile = $user->profile; - if(config('pixelfed.enforce_account_limit') == true) { + if(config_cache('pixelfed.enforce_account_limit') == true) { $size = Cache::remember($user->storageUsedKey(), now()->addDays(3), function() use($user) { return Media::whereUserId($user->id)->sum('size') / 1000; }); diff --git a/app/Http/Controllers/ComposeController.php b/app/Http/Controllers/ComposeController.php index 6be25ea2e..ee317ad2c 100644 --- a/app/Http/Controllers/ComposeController.php +++ b/app/Http/Controllers/ComposeController.php @@ -92,7 +92,7 @@ class ComposeController extends Controller abort_if($limitReached == true, 429); - if(config('pixelfed.enforce_account_limit') == true) { + if(config_cache('pixelfed.enforce_account_limit') == true) { $size = Cache::remember($user->storageUsedKey(), now()->addDays(3), function() use($user) { return Media::whereUserId($user->id)->sum('size') / 1000; }); diff --git a/app/Http/Controllers/DirectMessageController.php b/app/Http/Controllers/DirectMessageController.php index 3f03b7a1a..e01a0ef90 100644 --- a/app/Http/Controllers/DirectMessageController.php +++ b/app/Http/Controllers/DirectMessageController.php @@ -522,7 +522,7 @@ class DirectMessageController extends Controller $hidden = false; } - if(config('pixelfed.enforce_account_limit') == true) { + if(config_cache('pixelfed.enforce_account_limit') == true) { $size = Cache::remember($user->storageUsedKey(), now()->addDays(3), function() use($user) { return Media::whereUserId($user->id)->sum('size') / 1000; }); diff --git a/app/Http/Controllers/Settings/HomeSettings.php b/app/Http/Controllers/Settings/HomeSettings.php index 2cee249d0..ab9a6fbb7 100644 --- a/app/Http/Controllers/Settings/HomeSettings.php +++ b/app/Http/Controllers/Settings/HomeSettings.php @@ -25,7 +25,7 @@ trait HomeSettings $id = Auth::user()->profile->id; $storage = []; $used = Media::whereProfileId($id)->sum('size'); - $storage['limit'] = config('pixelfed.max_account_size') * 1024; + $storage['limit'] = config_cache('pixelfed.max_account_size') * 1024; $storage['used'] = $used; $storage['percentUsed'] = ceil($storage['used'] / $storage['limit'] * 100); $storage['limitPretty'] = PrettyNumber::size($storage['limit']); diff --git a/app/Util/Site/Config.php b/app/Util/Site/Config.php index 97319180d..d9836ca70 100644 --- a/app/Util/Site/Config.php +++ b/app/Util/Site/Config.php @@ -23,7 +23,7 @@ class Config { 'optimize_video' => config('pixelfed.optimize_video'), 'media_types' => config_cache('pixelfed.media_types'), - 'enforce_account_limit' => config('pixelfed.enforce_account_limit') + 'enforce_account_limit' => config_cache('pixelfed.enforce_account_limit') ], 'activitypub' => [ diff --git a/resources/views/settings/home.blade.php b/resources/views/settings/home.blade.php index b55eaff16..93b3cd56b 100644 --- a/resources/views/settings/home.blade.php +++ b/resources/views/settings/home.blade.php @@ -2,99 +2,99 @@ @section('section') -