mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-11-26 00:03:16 +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');
|
$this->middleware('auth');
|
||||||
|
|
||||||
if(config('pixelfed.import.instagram.enabled') != true) {
|
if(config_cache('pixelfed.import.instagram.enabled') != true) {
|
||||||
abort(404, 'Feature not enabled');
|
abort(404, 'Feature not enabled');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -77,13 +77,13 @@ class SettingsController extends Controller
|
||||||
|
|
||||||
public function dataImport()
|
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');
|
return view('settings.import.home');
|
||||||
}
|
}
|
||||||
|
|
||||||
public function dataImportInstagram()
|
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');
|
return view('settings.import.instagram.home');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -49,7 +49,7 @@ class ImportInstagram implements ShouldQueue
|
||||||
*/
|
*/
|
||||||
public function handle()
|
public function handle()
|
||||||
{
|
{
|
||||||
if(config('pixelfed.import.instagram.enabled') != true) {
|
if(config_cache('pixelfed.import.instagram.enabled') != true) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -59,7 +59,7 @@ class Config {
|
||||||
'stories' => config_cache('instance.stories.enabled'),
|
'stories' => config_cache('instance.stories.enabled'),
|
||||||
'video' => Str::contains(config_cache('pixelfed.media_types'), 'video/mp4'),
|
'video' => Str::contains(config_cache('pixelfed.media_types'), 'video/mp4'),
|
||||||
'import' => [
|
'import' => [
|
||||||
'instagram' => config('pixelfed.import.instagram.enabled'),
|
'instagram' => config_cache('pixelfed.import.instagram.enabled'),
|
||||||
'mastodon' => false,
|
'mastodon' => false,
|
||||||
'pixelfed' => false
|
'pixelfed' => false
|
||||||
],
|
],
|
||||||
|
|
|
@ -32,7 +32,7 @@
|
||||||
<li class="nav-item">
|
<li class="nav-item">
|
||||||
<hr>
|
<hr>
|
||||||
</li>
|
</li>
|
||||||
@if(config('pixelfed.import.instagram.enabled'))
|
@if(config_cache('pixelfed.import.instagram.enabled'))
|
||||||
<li class="nav-item pl-3 {{request()->is('*import*')?'active':''}}">
|
<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>
|
<a class="nav-link font-weight-light text-muted" href="{{route('settings.import')}}">Import</a>
|
||||||
</li>
|
</li>
|
||||||
|
|
Loading…
Reference in a new issue