diff --git a/app/Http/Controllers/SettingsController.php b/app/Http/Controllers/SettingsController.php index 9082f7223a..68943f912e 100755 --- a/app/Http/Controllers/SettingsController.php +++ b/app/Http/Controllers/SettingsController.php @@ -1018,8 +1018,6 @@ class SettingsController extends Controller // Skip dotfiles like .gitignore and .DS_STORE if ((substr(basename($backup_files[$f]), 0, 1) != '.')) { - \Log::debug(basename($backup_files[$f])); - \Log::debug($backup_files[$f]. ' is dotfileish?'); $files[] = [ 'filename' => basename($backup_files[$f]), @@ -1081,9 +1079,11 @@ class SettingsController extends Controller */ public function downloadFile($filename = null) { + $path = 'app/backups'; + if (! config('app.lock_passwords')) { - if (Storage::exists($filename)) { - return Response::download(Storage::url('') . e($filename)); + if (Storage::exists($path . '/' . $filename)) { + return Storage::download($path . '/' . $filename); } else { // Redirect to the backup page return redirect()->route('settings.backups.index')->with('error', trans('admin/settings/message.backup.file_not_found')); @@ -1106,12 +1106,11 @@ class SettingsController extends Controller public function deleteFile($filename = null) { if (! config('app.lock_passwords')) { - $path = 'backups'; + $path = 'app/backups'; if (Storage::exists($path . '/' . $filename)) { try { Storage::delete($path . '/' . $filename); - return redirect()->route('settings.backups.index')->with('success', trans('admin/settings/message.backup.file_deleted')); } catch (\Exception $e) { \Log::debug($e); diff --git a/resources/views/settings/backups.blade.php b/resources/views/settings/backups.blade.php index 4e36f7050d..bea2a5bd44 100644 --- a/resources/views/settings/backups.blade.php +++ b/resources/views/settings/backups.blade.php @@ -29,7 +29,11 @@ @foreach ($files as $file) - {{ $file['filename'] }} + + + {{ $file['filename'] }} + + {{ date("M d, Y g:i A", $file['modified']) }} {{ $file['filesize'] }}