Merge branch 'develop' into dane/restore-backups
This commit is contained in:
commit
663143de0b
575 changed files with 6080 additions and 6864 deletions
|
@ -10,8 +10,8 @@ use Pterodactyl\Exceptions\Http\Server\ServerTransferringException;
|
|||
|
||||
class SuspensionService
|
||||
{
|
||||
const ACTION_SUSPEND = 'suspend';
|
||||
const ACTION_UNSUSPEND = 'unsuspend';
|
||||
public const ACTION_SUSPEND = 'suspend';
|
||||
public const ACTION_UNSUSPEND = 'unsuspend';
|
||||
|
||||
/**
|
||||
* @var \Illuminate\Database\ConnectionInterface
|
||||
|
@ -25,9 +25,6 @@ class SuspensionService
|
|||
|
||||
/**
|
||||
* SuspensionService constructor.
|
||||
*
|
||||
* @param \Illuminate\Database\ConnectionInterface $connection
|
||||
* @param \Pterodactyl\Repositories\Wings\DaemonServerRepository $daemonServerRepository
|
||||
*/
|
||||
public function __construct(
|
||||
ConnectionInterface $connection,
|
||||
|
@ -40,7 +37,6 @@ class SuspensionService
|
|||
/**
|
||||
* Suspends a server on the system.
|
||||
*
|
||||
* @param \Pterodactyl\Models\Server $server
|
||||
* @param string $action
|
||||
*
|
||||
* @throws \Throwable
|
||||
|
@ -58,8 +54,8 @@ class SuspensionService
|
|||
}
|
||||
|
||||
// Check if the server is currently being transferred.
|
||||
if (! is_null($server->transfer)) {
|
||||
throw new ServerTransferringException;
|
||||
if (!is_null($server->transfer)) {
|
||||
throw new ServerTransferringException();
|
||||
}
|
||||
|
||||
$this->connection->transaction(function () use ($action, $server, $isSuspending) {
|
||||
|
|
Reference in a new issue