Skip to content

Commit 5ca1383

Browse files
committed
Merge branch 'develop' into feature/vue-serverview
2 parents 5c4d5f7 + c305320 commit 5ca1383

File tree

110 files changed

+7019
-1922
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

110 files changed

+7019
-1922
lines changed

.env.example

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ APP_CLEAR_TASKLOG=720
77
APP_DELETE_MINUTES=10
88
APP_ENVIRONMENT_ONLY=true
99
LOG_CHANNEL=daily
10-
APP_
10+
APP_LOCALE=en
1111

1212
DB_HOST=127.0.0.1
1313
DB_PORT=3306

.gitignore

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,5 +19,14 @@ public/assets/*
1919
.dockerignore
2020
Dockerfile
2121
docker-compose.yml
22+
# for image related files
23+
misc
24+
.phpstorm.meta.php
25+
.php_cs.cache
26+
27+
coverage.xml
28+
29+
# Vagrant
30+
*.log
2231
resources/lang/locales.js
2332
resources/assets/pterodactyl/scripts/helpers/ziggy.js

CHANGELOG.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,18 @@ This file is a running track of new features and fixes to each version of the pa
33

44
This project follows [Semantic Versioning](http://semver.org) guidelines.
55

6+
## v0.7.10 (Derelict Dermodactylus)
7+
### Fixed
8+
* Scheduled tasks triggered manually no longer improperly change the `next_run_at` time and do not run twice in a row anymore.
9+
* Changing the maximum web-based file upload size for a node now properly validates and updates.
10+
* Changing configuration values for a node now correctly updates them on the daemon on the first request, rather than requiring a second request to set them.
11+
12+
### Changed
13+
* Egg and server variable values are no longer limited to 191 characters. Turns out some games require a large number of characters in these fields.
14+
15+
### Added
16+
* Users can now select their preferred language in their account settings.
17+
618
## v0.7.9 (Derelict Dermodactylus)
719
### Fixed
820
* Fixes a two-factor authentication bypass present in the password reset process for an account.

README.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,19 @@
11
[![Logo Image](https://cdn.pterodactyl.io/logos/Banner%20Logo%20Black@2x.png)](https://pterodactyl.io)
22

3-
[![Build Status](https://travis-ci.org/pterodactyl/panel.svg?branch=develop)](https://travis-ci.org/pterodactyl/panel) [![StyleCI](https://styleci.io/repos/47508644/shield?branch=develop)](https://styleci.io/repos/47508644) [![codecov](https://codecov.io/gh/pterodactyl/panel/branch/develop/graph/badge.svg)](https://codecov.io/gh/Pterodactyl/Panel)
3+
[![Build status](https://img.shields.io/travis/pterodactyl/panel/develop.svg?style=flat-square)](https://travis-ci.org/pterodactyl/panel)
4+
[![StyleCI](https://styleci.io/repos/47508644/shield?branch=develop)](https://styleci.io/repos/47508644)
5+
[![Codecov](https://img.shields.io/codecov/c/github/pterodactyl/panel/develop.svg?style=flat-square)](https://codecov.io/gh/Pterodactyl/Panel)
6+
[![Discord](https://img.shields.io/discord/122900397965705216.svg?style=flat-square&label=Discord)](https://pterodactyl.io/discord)
47

58
# Pterodactyl Panel
9+
610
Pterodactyl is the open-source game server management panel built with PHP7, Nodejs, and Go. Designed with security in mind, Pterodactyl runs all game servers in isolated Docker containers while exposing a beautiful and intuitive UI to administrators and users.
711
What more are you waiting for? Make game servers a first class citizen on your platform today.
812

913
![Image](https://cdn.pterodactyl.io/site-assets/mockup-macbook-grey.png)
1014

1115
## Support & Documentation
12-
Support for using Pterodactyl can be found on our [Documentation Website](https://docs.pterodactyl.io), [Guides Website](https://guides.pterodactyl.io), or via our [Discord Chat](https://discord.gg/QRDZvVm).
16+
Support for using Pterodactyl can be found on our [Documentation Website](https://pterodactyl.io/project/introduction.html), [Guides Website](https://guides.pterodactyl.io), or via our [Discord Chat](https://discord.gg/QRDZvVm).
1317

1418
### Supported Games
1519
We support a huge variety of games by utilizing Docker containers to isolate each instance, giving you the power to host your games across the world without having to bloat each physical machine with additional dependencies.

app/Console/Commands/Schedule/ProcessRunnableCommand.php

Lines changed: 9 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -9,19 +9,14 @@
99

1010
namespace Pterodactyl\Console\Commands\Schedule;
1111

12-
use Carbon\Carbon;
12+
use Cake\Chronos\Chronos;
1313
use Illuminate\Console\Command;
1414
use Illuminate\Support\Collection;
1515
use Pterodactyl\Services\Schedules\ProcessScheduleService;
1616
use Pterodactyl\Contracts\Repository\ScheduleRepositoryInterface;
1717

1818
class ProcessRunnableCommand extends Command
1919
{
20-
/**
21-
* @var \Carbon\Carbon
22-
*/
23-
protected $carbon;
24-
2520
/**
2621
* @var string
2722
*/
@@ -45,31 +40,28 @@ class ProcessRunnableCommand extends Command
4540
/**
4641
* ProcessRunnableCommand constructor.
4742
*
48-
* @param \Carbon\Carbon $carbon
4943
* @param \Pterodactyl\Services\Schedules\ProcessScheduleService $processScheduleService
5044
* @param \Pterodactyl\Contracts\Repository\ScheduleRepositoryInterface $repository
5145
*/
52-
public function __construct(
53-
Carbon $carbon,
54-
ProcessScheduleService $processScheduleService,
55-
ScheduleRepositoryInterface $repository
56-
) {
46+
public function __construct(ProcessScheduleService $processScheduleService, ScheduleRepositoryInterface $repository)
47+
{
5748
parent::__construct();
5849

59-
$this->carbon = $carbon;
6050
$this->processScheduleService = $processScheduleService;
6151
$this->repository = $repository;
6252
}
6353

6454
/**
6555
* Handle command execution.
66-
*
67-
* @throws \Pterodactyl\Exceptions\Model\DataValidationException
68-
* @throws \Pterodactyl\Exceptions\Repository\RecordNotFoundException
6956
*/
7057
public function handle()
7158
{
72-
$schedules = $this->repository->getSchedulesToProcess($this->carbon->now()->toAtomString());
59+
$schedules = $this->repository->getSchedulesToProcess(Chronos::now()->toAtomString());
60+
if ($schedules->count() < 1) {
61+
$this->line('There are no scheduled tasks for servers that need to be run.');
62+
63+
return;
64+
}
7365

7466
$bar = $this->output->createProgressBar(count($schedules));
7567
$schedules->each(function ($schedule) use ($bar) {

app/Http/Controllers/Api/Application/Locations/LocationController.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
use Pterodactyl\Contracts\Repository\LocationRepositoryInterface;
1212
use Pterodactyl\Transformers\Api\Application\LocationTransformer;
1313
use Pterodactyl\Http\Controllers\Api\Application\ApplicationApiController;
14+
use Pterodactyl\Http\Requests\Api\Application\Locations\GetLocationRequest;
1415
use Pterodactyl\Http\Requests\Api\Application\Locations\GetLocationsRequest;
1516
use Pterodactyl\Http\Requests\Api\Application\Locations\DeleteLocationRequest;
1617
use Pterodactyl\Http\Requests\Api\Application\Locations\UpdateLocationRequest;
@@ -77,7 +78,7 @@ public function index(GetLocationsRequest $request): array
7778
/**
7879
* Return a single location.
7980
*
80-
* @param \Pterodactyl\Http\Controllers\Api\Application\Locations\GetLocationRequest $request
81+
* @param \Pterodactyl\Http\Requests\Api\Application\Locations\GetLocationRequest $request
8182
* @return array
8283
*/
8384
public function view(GetLocationRequest $request): array

app/Http/Controllers/Api/Application/Nodes/NodeController.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ public function store(StoreNodeRequest $request): JsonResponse
124124
*/
125125
public function update(UpdateNodeRequest $request): array
126126
{
127-
$node = $this->updateService->returnUpdatedModel()->handle(
127+
$node = $this->updateService->handle(
128128
$request->getModel(Node::class), $request->validated()
129129
);
130130

app/Http/Controllers/Base/AccountController.php

Whitespace-only changes.

app/Http/Controllers/Server/Tasks/ActionController.php

Whitespace-only changes.

app/Http/Middleware/LanguageMiddleware.php

Lines changed: 4 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,10 @@
11
<?php
2-
/**
3-
* Pterodactyl - Panel
4-
* Copyright (c) 2015 - 2017 Dane Everitt <dane@daneeveritt.com>.
5-
*
6-
* This software is licensed under the terms of the MIT license.
7-
* https://opensource.org/licenses/MIT
8-
*/
92

103
namespace Pterodactyl\Http\Middleware;
114

125
use Closure;
136
use Illuminate\Http\Request;
147
use Illuminate\Foundation\Application;
15-
use Illuminate\Contracts\Config\Repository;
168

179
class LanguageMiddleware
1810
{
@@ -21,33 +13,26 @@ class LanguageMiddleware
2113
*/
2214
private $app;
2315

24-
/**
25-
* @var \Illuminate\Contracts\Config\Repository
26-
*/
27-
private $config;
28-
2916
/**
3017
* LanguageMiddleware constructor.
3118
*
32-
* @param \Illuminate\Foundation\Application $app
33-
* @param \Illuminate\Contracts\Config\Repository $config
19+
* @param \Illuminate\Foundation\Application $app
3420
*/
35-
public function __construct(Application $app, Repository $config)
21+
public function __construct(Application $app)
3622
{
3723
$this->app = $app;
38-
$this->config = $config;
3924
}
4025

4126
/**
42-
* Handle an incoming request.
27+
* Handle an incoming request and set the user's preferred language.
4328
*
4429
* @param \Illuminate\Http\Request $request
4530
* @param \Closure $next
4631
* @return mixed
4732
*/
4833
public function handle(Request $request, Closure $next)
4934
{
50-
$this->app->setLocale($this->config->get('app.locale', 'en'));
35+
$this->app->setLocale($request->user()->language ?? config('app.locale', 'en'));
5136

5237
return $next($request);
5338
}

0 commit comments

Comments
 (0)