We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.
@@ -17,10 +17,10 @@ discard block |
||
17 | 17 | |
18 | 18 | $this->data['backups'] = []; |
19 | 19 | |
20 | - foreach (config('laravel-backup.backup.destination.disks') as $disk_name) { |
|
21 | - $disk = Storage::disk($disk_name); |
|
22 | - $adapter = $disk->getDriver()->getAdapter(); |
|
23 | - $files = $disk->allFiles(); |
|
20 | + foreach (config('laravel-backup.backup.destination.disks') as $disk_name) { |
|
21 | + $disk = Storage::disk($disk_name); |
|
22 | + $adapter = $disk->getDriver()->getAdapter(); |
|
23 | + $files = $disk->allFiles(); |
|
24 | 24 | |
25 | 25 | // make an array of backup files, with their filesize and creation date |
26 | 26 | foreach ($files as $k => $f) { |
@@ -49,14 +49,14 @@ discard block |
||
49 | 49 | { |
50 | 50 | try { |
51 | 51 | ini_set('max_execution_time', 300); |
52 | - // start the backup process |
|
53 | - Artisan::call('backup:run'); |
|
52 | + // start the backup process |
|
53 | + Artisan::call('backup:run'); |
|
54 | 54 | $output = Artisan::output(); |
55 | 55 | |
56 | - // log the results |
|
57 | - Log::info("Backpack\BackupManager -- new backup started from admin interface \r\n".$output); |
|
58 | - // return the results as a response to the ajax call |
|
59 | - echo $output; |
|
56 | + // log the results |
|
57 | + Log::info("Backpack\BackupManager -- new backup started from admin interface \r\n".$output); |
|
58 | + // return the results as a response to the ajax call |
|
59 | + echo $output; |
|
60 | 60 | } catch (Exception $e) { |
61 | 61 | Response::make($e->getMessage(), 500); |
62 | 62 | } |
@@ -64,47 +64,47 @@ discard block |
||
64 | 64 | return 'success'; |
65 | 65 | } |
66 | 66 | |
67 | - /** |
|
68 | - * Downloads a backup zip file. |
|
69 | - */ |
|
70 | - public function download() |
|
71 | - { |
|
72 | - $disk = Storage::disk(\Request::input('disk')); |
|
73 | - $file_name = \Request::input('file_name'); |
|
74 | - $adapter = $disk->getDriver()->getAdapter(); |
|
75 | - |
|
76 | - if ($adapter instanceof \League\Flysystem\Adapter\Local) { |
|
77 | - $storage_path = $disk->getDriver()->getAdapter()->getPathPrefix(); |
|
78 | - |
|
79 | - if ($disk->exists($file_name)) { |
|
80 | - return response()->download($storage_path.$file_name); |
|
81 | - } |
|
82 | - else |
|
83 | - { |
|
84 | - abort(404, trans('backpack::backup.backup_doesnt_exist')); |
|
85 | - } |
|
86 | - } |
|
87 | - else |
|
88 | - { |
|
89 | - abort(404, trans('backpack::backup.only_local_downloads_supported')); |
|
90 | - } |
|
91 | - } |
|
92 | - |
|
93 | - /** |
|
94 | - * Deletes a backup file. |
|
95 | - */ |
|
96 | - public function delete($file_name) |
|
97 | - { |
|
98 | - $disk = Storage::disk(\Request::input('disk')); |
|
99 | - |
|
100 | - if ($disk->exists($file_name)) { |
|
101 | - $disk->delete($file_name); |
|
102 | - |
|
103 | - return 'success'; |
|
104 | - } |
|
105 | - else |
|
106 | - { |
|
107 | - abort(404, trans('backpack::backup.backup_doesnt_exist')); |
|
108 | - } |
|
109 | - } |
|
67 | + /** |
|
68 | + * Downloads a backup zip file. |
|
69 | + */ |
|
70 | + public function download() |
|
71 | + { |
|
72 | + $disk = Storage::disk(\Request::input('disk')); |
|
73 | + $file_name = \Request::input('file_name'); |
|
74 | + $adapter = $disk->getDriver()->getAdapter(); |
|
75 | + |
|
76 | + if ($adapter instanceof \League\Flysystem\Adapter\Local) { |
|
77 | + $storage_path = $disk->getDriver()->getAdapter()->getPathPrefix(); |
|
78 | + |
|
79 | + if ($disk->exists($file_name)) { |
|
80 | + return response()->download($storage_path.$file_name); |
|
81 | + } |
|
82 | + else |
|
83 | + { |
|
84 | + abort(404, trans('backpack::backup.backup_doesnt_exist')); |
|
85 | + } |
|
86 | + } |
|
87 | + else |
|
88 | + { |
|
89 | + abort(404, trans('backpack::backup.only_local_downloads_supported')); |
|
90 | + } |
|
91 | + } |
|
92 | + |
|
93 | + /** |
|
94 | + * Deletes a backup file. |
|
95 | + */ |
|
96 | + public function delete($file_name) |
|
97 | + { |
|
98 | + $disk = Storage::disk(\Request::input('disk')); |
|
99 | + |
|
100 | + if ($disk->exists($file_name)) { |
|
101 | + $disk->delete($file_name); |
|
102 | + |
|
103 | + return 'success'; |
|
104 | + } |
|
105 | + else |
|
106 | + { |
|
107 | + abort(404, trans('backpack::backup.backup_doesnt_exist')); |
|
108 | + } |
|
109 | + } |
|
110 | 110 | } |