1
1
mirror of https://github.com/pterodactyl/panel.git synced 2024-11-22 09:02:28 +01:00

allow emptying server description, closes #442

This commit is contained in:
Dane Everitt 2017-05-23 23:00:31 -05:00
parent 0e48c94918
commit 9116547e98
No known key found for this signature in database
GPG Key ID: EEA66103B3D71F53
3 changed files with 8 additions and 4 deletions

View File

@ -15,6 +15,7 @@ This project follows [Semantic Versioning](http://semver.org) guidelines.
### Changed
* Renamed session cookies from `laravel_session` to `pterodactyl_session`.
* Sessions are now encrypted before being stored as an additional layer of security.
* It is now possible to clear out a server description and have it be blank, rather than throwing an error about the field being required.
## v0.6.0 (Courageous Carniadactylus)
### Fixed

View File

@ -273,9 +273,12 @@ class ServersController extends Controller
{
$repo = new ServerRepository;
try {
$repo->updateDetails($id, $request->intersect([
'owner_id', 'name', 'description', 'reset_token',
]));
$repo->updateDetails($id, array_merge(
$request->only('description'),
$request->intersect([
'owner_id', 'name', 'reset_token',
])
));
Alert::success('Server details were successfully updated.')->flash();
} catch (DisplayValidationException $ex) {

View File

@ -370,7 +370,7 @@ class ServerRepository
$validator = Validator::make($data, [
'owner_id' => 'sometimes|required|integer|exists:users,id',
'name' => 'sometimes|required|regex:([\w .-]{1,200})',
'description' => 'sometimes|required|string',
'description' => 'sometimes|nullable|string',
'reset_token' => 'sometimes|required|accepted',
]);