diff --git a/app/Http/Controllers/ImportController.php b/app/Http/Controllers/ImportController.php index 37a5ddd7e..9885455e9 100644 --- a/app/Http/Controllers/ImportController.php +++ b/app/Http/Controllers/ImportController.php @@ -12,7 +12,7 @@ class ImportController extends Controller { $this->middleware('auth'); - if(config('pixelfed.import.instagram.enabled') != true) { + if(config_cache('pixelfed.import.instagram.enabled') != true) { abort(404, 'Feature not enabled'); } } diff --git a/app/Http/Controllers/SettingsController.php b/app/Http/Controllers/SettingsController.php index 92cddec4a..e84ae0987 100644 --- a/app/Http/Controllers/SettingsController.php +++ b/app/Http/Controllers/SettingsController.php @@ -77,13 +77,13 @@ class SettingsController extends Controller public function dataImport() { - abort_if(!config('pixelfed.import.instagram.enabled'), 404); + abort_if(!config_cache('pixelfed.import.instagram.enabled'), 404); return view('settings.import.home'); } public function dataImportInstagram() { - abort_if(!config('pixelfed.import.instagram.enabled'), 404); + abort_if(!config_cache('pixelfed.import.instagram.enabled'), 404); return view('settings.import.instagram.home'); } diff --git a/app/Jobs/ImportPipeline/ImportInstagram.php b/app/Jobs/ImportPipeline/ImportInstagram.php index ea7258289..baf5728b7 100644 --- a/app/Jobs/ImportPipeline/ImportInstagram.php +++ b/app/Jobs/ImportPipeline/ImportInstagram.php @@ -49,7 +49,7 @@ class ImportInstagram implements ShouldQueue */ public function handle() { - if(config('pixelfed.import.instagram.enabled') != true) { + if(config_cache('pixelfed.import.instagram.enabled') != true) { return; } diff --git a/app/Util/Site/Config.php b/app/Util/Site/Config.php index 5d470b798..97319180d 100644 --- a/app/Util/Site/Config.php +++ b/app/Util/Site/Config.php @@ -59,7 +59,7 @@ class Config { 'stories' => config_cache('instance.stories.enabled'), 'video' => Str::contains(config_cache('pixelfed.media_types'), 'video/mp4'), 'import' => [ - 'instagram' => config('pixelfed.import.instagram.enabled'), + 'instagram' => config_cache('pixelfed.import.instagram.enabled'), 'mastodon' => false, 'pixelfed' => false ], diff --git a/resources/views/settings/partial/sidebar.blade.php b/resources/views/settings/partial/sidebar.blade.php index 8d6fd4011..ac50f93e4 100644 --- a/resources/views/settings/partial/sidebar.blade.php +++ b/resources/views/settings/partial/sidebar.blade.php @@ -32,7 +32,7 @@ - @if(config('pixelfed.import.instagram.enabled')) + @if(config_cache('pixelfed.import.instagram.enabled'))