1
1
mirror of https://github.com/pterodactyl/panel.git synced 2024-10-27 20:32:28 +01:00

Fix database name using d#_ rather than s#_, ref #957

This commit is contained in:
Dane Everitt 2018-02-18 13:46:42 -06:00
parent 3fb02a4b3c
commit 541b9ec7f5
No known key found for this signature in database
GPG Key ID: EEA66103B3D71F53

View File

@ -1,11 +1,4 @@
<?php
/**
* Pterodactyl - Panel
* Copyright (c) 2015 - 2017 Dane Everitt <dane@daneeveritt.com>.
*
* This software is licensed under the terms of the MIT license.
* https://opensource.org/licenses/MIT
*/
namespace Pterodactyl\Services\Databases;
@ -65,13 +58,11 @@ class DatabaseManagementService
* @return \Illuminate\Database\Eloquent\Model
*
* @throws \Exception
* @throws \Pterodactyl\Exceptions\DisplayException
* @throws \Pterodactyl\Exceptions\Model\DataValidationException
*/
public function create($server, array $data)
{
$data['server_id'] = $server;
$data['database'] = sprintf('d%d_%s', $server, $data['database']);
$data['database'] = sprintf('s%d_%s', $server, $data['database']);
$data['username'] = sprintf('u%d_%s', $server, str_random(10));
$data['password'] = $this->encrypter->encrypt(str_random(16));