Skip to content

Commit 9d77c57

Browse files
committed
Now adding random prefix to backups
1 parent 02f6200 commit 9d77c57

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

config/backup.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
<?php
22

3+
use Illuminate\Support\Str;
4+
35
return [
46

57
'backup' => [
@@ -109,7 +111,7 @@
109111
/*
110112
* The filename prefix used for the backup zip file.
111113
*/
112-
'filename_prefix' => '',
114+
'filename_prefix' => Str::random(16).'-',
113115

114116
/*
115117
* The disk names on which the backups will be stored.

resources/views/components/config/backups.blade.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,8 @@
3232
if ($handle = opendir('backups/updater-backups')) {
3333
while (false !== ($entry = readdir($handle))) {
3434
if ($entry != "." && $entry != "..") {
35-
echo '<div class="button-entrance"><a class="buttondm button-hover icon-hover" style="color:#ffffff; background-color:#000;" href="' . url('admin/backups') . '/?' . $entry . '"><i style="color: " class="icon hvr-icon fa fa-download"></i>&nbsp; '; print_r($entry); echo '</a></div><br>';
35+
$entrys = substr($entry, 17);
36+
echo '<div class="button-entrance"><a class="buttondm button-hover icon-hover" style="color:#ffffff; background-color:#000;" href="' . url('admin/backups') . '/?' . $entry . '"><i style="color: " class="icon hvr-icon fa fa-download"></i>&nbsp; '; print_r($entrys); echo '</a></div><br>';
3637
}}} ?>
3738
</div>
3839

0 commit comments

Comments
 (0)