mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-11-22 06:21:27 +00:00
Update config() to config_cache()
This commit is contained in:
parent
1c2baa8f2c
commit
c65d03788b
5 changed files with 6 additions and 6 deletions
|
@ -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');
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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');
|
||||
}
|
||||
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -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
|
||||
],
|
||||
|
|
|
@ -32,7 +32,7 @@
|
|||
<li class="nav-item">
|
||||
<hr>
|
||||
</li>
|
||||
@if(config('pixelfed.import.instagram.enabled'))
|
||||
@if(config_cache('pixelfed.import.instagram.enabled'))
|
||||
<li class="nav-item pl-3 {{request()->is('*import*')?'active':''}}">
|
||||
<a class="nav-link font-weight-light text-muted" href="{{route('settings.import')}}">Import</a>
|
||||
</li>
|
||||
|
|
Loading…
Reference in a new issue