Skip to content

Commit 9a57011

Browse files
committed
Merge branch 'develop' of https://github.com/Pterodactyl/Panel into develop
2 parents 087c41d + 9c4c080 commit 9a57011

File tree

8 files changed

+20
-13
lines changed

8 files changed

+20
-13
lines changed

.env.example

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ HASHIDS_SALT=
1919
HASHIDS_LENGTH=8
2020

2121
MAIL_DRIVER=smtp
22-
MAIL_HOST=mailtrap.io
23-
MAIL_PORT=2525
22+
MAIL_HOST=smtp.example.com
23+
MAIL_PORT=25
2424
MAIL_USERNAME=
2525
MAIL_PASSWORD=
2626
MAIL_ENCRYPTION=tls

app/Console/Kernel.php

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,13 @@ protected function schedule(Schedule $schedule)
2525
// Execute scheduled commands for servers every minute, as if there was a normal cron running.
2626
$schedule->command('p:schedule:process')->everyMinute()->withoutOverlapping();
2727

28-
// Every 30 minutes, run the backup pruning command so that any abandoned backups can be removed
29-
// from the UI view for the server.
30-
$schedule->command('p:maintenance:prune-backups', [
31-
'--since-minutes' => '30',
32-
])->everyThirtyMinutes();
28+
// Every 30 minutes, run the backup pruning command so that any abandoned backups can be deleted.
29+
$pruneAge = config('backups.prune_age', 360); // Defaults to 6 hours (time is in minuteS)
30+
if ($pruneAge > 0) {
31+
$schedule->command('p:maintenance:prune-backups', [
32+
'--since-minutes' => $pruneAge,
33+
])->everyThirtyMinutes();
34+
}
3335

3436
// Every day cleanup any internal backups of service files.
3537
$schedule->command('p:maintenance:clean-service-backups')->daily();

app/Http/Controllers/Api/Remote/Backups/BackupRemoteUploadController.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ public function __construct(BackupRepository $repository, BackupManager $backupM
5252
public function __invoke(Request $request, string $backup)
5353
{
5454
// Get the size query parameter.
55-
$size = (int)$request->query('size');
55+
$size = (int) $request->query('size');
5656
if (empty($size)) {
5757
throw new BadRequestHttpException('A non-empty "size" query parameter must be provided.');
5858
}

app/Repositories/Wings/DaemonBackupRepository.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
namespace Pterodactyl\Repositories\Wings;
44

5+
use Illuminate\Support\Arr;
56
use Webmozart\Assert\Assert;
67
use Pterodactyl\Models\Backup;
78
use Pterodactyl\Models\Server;
@@ -48,7 +49,7 @@ public function backup(Backup $backup): ResponseInterface
4849
'json' => [
4950
'adapter' => $this->adapter ?? config('backups.default'),
5051
'uuid' => $backup->uuid,
51-
'ignored_files' => $backup->ignored_files,
52+
'ignore' => implode('\n', $backup->ignored_files),
5253
],
5354
]
5455
);

app/Services/Backups/InitiateBackupService.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -117,9 +117,9 @@ public function handle(Server $server, string $name = null, bool $override = fal
117117
}
118118

119119
// Check if the server has reached or exceeded it's backup limit
120-
if (!$server->backup_limit || $server->backups()->where('is_successful', true)->count() >= $server->backup_limit) {
120+
if (! $server->backup_limit || $server->backups()->where('is_successful', true)->count() >= $server->backup_limit) {
121121
// Do not allow the user to continue if this server is already at its limit and can't override.
122-
if (!$override || $server->backup_limit <= 0) {
122+
if (! $override || $server->backup_limit <= 0) {
123123
throw new TooManyBackupsException($server->backup_limit);
124124
}
125125

config/backups.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@
1212
// uses to upload backups to S3 storage. Value is in minutes, so this would default to an hour.
1313
'presigned_url_lifespan' => env('BACKUP_PRESIGNED_URL_LIFESPAN', 60),
1414

15+
// The time to wait before automatically failing a backup, time is in minutes and defaults
16+
// to 6 hours. To disable this feature, set the value to `0`.
17+
'prune_age' => env('BACKUP_PRUNE_AGE', 360),
18+
1519
'disks' => [
1620
// There is no configuration for the local disk for Wings. That configuration
1721
// is determined by the Daemon configuration, and not the Panel.

database/seeds/eggs/minecraft/egg-sponge--sponge-vanilla.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
"name": "Sponge Version",
2929
"description": "The version of SpongeVanilla to download and use.",
3030
"env_variable": "SPONGE_VERSION",
31-
"default_value": "1.11.2-6.1.0-BETA-21",
31+
"default_value": "1.12.2-7.3.0",
3232
"user_viewable": true,
3333
"user_editable": false,
3434
"rules": "required|regex:\/^([a-zA-Z0-9.\\-_]+)$\/"

resources/scripts/components/server/databases/DatabaseRow.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ export default ({ database, className }: Props) => {
127127
<Can action={'database.view_password'}>
128128
<div css={tw`mt-6`}>
129129
<Label>Password</Label>
130-
<CopyOnClick text={database.password?.valueOf}><Input type={'text'} readOnly value={database.password}/></CopyOnClick>
130+
<CopyOnClick text={database.password}><Input type={'text'} readOnly value={database.password}/></CopyOnClick>
131131
</div>
132132
</Can>
133133
<div css={tw`mt-6`}>

0 commit comments

Comments
 (0)