1
0
Fork 0
forked from mirror/pixelfed

Update AdminSettingsController

This commit is contained in:
Daniel Supernault 2019-06-20 20:51:27 -06:00
parent 4348680907
commit 095b135f4f
No known key found for this signature in database
GPG key ID: 0DEF1C662C9033F7

View file

@ -27,7 +27,7 @@ trait AdminSettingsController
{ {
$editor = config('pixelfed.admin.env_editor'); $editor = config('pixelfed.admin.env_editor');
$config = !$editor ? false : file_get_contents(base_path('.env')); $config = !$editor ? false : file_get_contents(base_path('.env'));
$backup = !$editor ? false : file_get_contents(base_path('.env.backup')); $backup = !$editor ? false : (is_file(base_path('.env.backup')) ? file_get_contents(base_path('.env.backup')) : false);
return view('admin.settings.config', compact('editor', 'config', 'backup')); return view('admin.settings.config', compact('editor', 'config', 'backup'));
} }