From 969b16a56321cded9f770fac5edd692bd11d6c8d Mon Sep 17 00:00:00 2001 From: Dane Everitt Date: Sat, 2 Jun 2018 21:32:26 +0000 Subject: [PATCH 01/21] Apply fixes from StyleCI [ci skip] [skip ci] --- .../Repository/RepositoryInterface.php | 2 +- .../Repository/ServerRepositoryInterface.php | 2 +- .../Admin/StatisticsController.php | 22 +++++++--------- app/Http/Kernel.php | 2 +- .../Eloquent/EloquentRepository.php | 2 +- .../Eloquent/ServerRepository.php | 2 +- .../Controllers/PlainJavascriptInjection.php | 8 +++--- ..._05_04_123826_add_maintenance_to_nodes.php | 4 +-- .../Admin/StatisticsControllerTest.php | 25 ++++++++----------- 9 files changed, 30 insertions(+), 39 deletions(-) diff --git a/app/Contracts/Repository/RepositoryInterface.php b/app/Contracts/Repository/RepositoryInterface.php index 1a26eed7e..4cdebf7bb 100644 --- a/app/Contracts/Repository/RepositoryInterface.php +++ b/app/Contracts/Repository/RepositoryInterface.php @@ -202,7 +202,7 @@ interface RepositoryInterface public function insertIgnore(array $values): bool; /** - * Get the amount of entries in the database + * Get the amount of entries in the database. * * @return int */ diff --git a/app/Contracts/Repository/ServerRepositoryInterface.php b/app/Contracts/Repository/ServerRepositoryInterface.php index 344fa248c..6f392d05d 100644 --- a/app/Contracts/Repository/ServerRepositoryInterface.php +++ b/app/Contracts/Repository/ServerRepositoryInterface.php @@ -147,7 +147,7 @@ interface ServerRepositoryInterface extends RepositoryInterface, SearchableInter public function isUniqueUuidCombo(string $uuid, string $short): bool; /** - * Get the amount of servers that are suspended + * Get the amount of servers that are suspended. * * @return int */ diff --git a/app/Http/Controllers/Admin/StatisticsController.php b/app/Http/Controllers/Admin/StatisticsController.php index 2327fd88d..1ae807565 100644 --- a/app/Http/Controllers/Admin/StatisticsController.php +++ b/app/Http/Controllers/Admin/StatisticsController.php @@ -2,16 +2,14 @@ namespace Pterodactyl\Http\Controllers\Admin; -use Illuminate\Http\Request; -use Illuminate\Support\Facades\DB; -use Pterodactyl\Contracts\Repository\AllocationRepositoryInterface; -use Pterodactyl\Contracts\Repository\DatabaseRepositoryInterface; -use Pterodactyl\Contracts\Repository\EggRepositoryInterface; -use Pterodactyl\Contracts\Repository\NodeRepositoryInterface; -use Pterodactyl\Contracts\Repository\ServerRepositoryInterface; -use Pterodactyl\Contracts\Repository\UserRepositoryInterface; use Pterodactyl\Http\Controllers\Controller; +use Pterodactyl\Contracts\Repository\EggRepositoryInterface; use Pterodactyl\Traits\Controllers\PlainJavascriptInjection; +use Pterodactyl\Contracts\Repository\NodeRepositoryInterface; +use Pterodactyl\Contracts\Repository\UserRepositoryInterface; +use Pterodactyl\Contracts\Repository\ServerRepositoryInterface; +use Pterodactyl\Contracts\Repository\DatabaseRepositoryInterface; +use Pterodactyl\Contracts\Repository\AllocationRepositoryInterface; class StatisticsController extends Controller { @@ -29,15 +27,14 @@ class StatisticsController extends Controller private $userRepository; - function __construct( + public function __construct( AllocationRepositoryInterface $allocationRepository, DatabaseRepositoryInterface $databaseRepository, EggRepositoryInterface $eggRepository, NodeRepositoryInterface $nodeRepository, ServerRepositoryInterface $serverRepository, UserRepositoryInterface $userRepository - ) - { + ) { $this->allocationRepository = $allocationRepository; $this->databaseRepository = $databaseRepository; $this->eggRepository = $eggRepository; @@ -83,7 +80,7 @@ class StatisticsController extends Controller 'nodes' => $nodes, 'tokens' => $tokens, ]); - + return view('admin.statistics', [ 'servers' => $servers, 'nodes' => $nodes, @@ -97,5 +94,4 @@ class StatisticsController extends Controller 'totalAllocations' => $totalAllocations, ]); } - } diff --git a/app/Http/Kernel.php b/app/Http/Kernel.php index d21c8d3c8..404c40ae9 100644 --- a/app/Http/Kernel.php +++ b/app/Http/Kernel.php @@ -2,7 +2,6 @@ namespace Pterodactyl\Http; -use Pterodactyl\Http\Middleware\MaintenanceMiddleware; use Pterodactyl\Models\ApiKey; use Illuminate\Auth\Middleware\Authorize; use Illuminate\Auth\Middleware\Authenticate; @@ -21,6 +20,7 @@ use Illuminate\Routing\Middleware\SubstituteBindings; use Pterodactyl\Http\Middleware\AccessingValidServer; use Pterodactyl\Http\Middleware\Api\SetSessionDriver; use Illuminate\View\Middleware\ShareErrorsFromSession; +use Pterodactyl\Http\Middleware\MaintenanceMiddleware; use Pterodactyl\Http\Middleware\RedirectIfAuthenticated; use Illuminate\Auth\Middleware\AuthenticateWithBasicAuth; use Pterodactyl\Http\Middleware\Api\AuthenticateIPAccess; diff --git a/app/Repositories/Eloquent/EloquentRepository.php b/app/Repositories/Eloquent/EloquentRepository.php index 64e7cfb60..cf0931799 100644 --- a/app/Repositories/Eloquent/EloquentRepository.php +++ b/app/Repositories/Eloquent/EloquentRepository.php @@ -298,7 +298,7 @@ abstract class EloquentRepository extends Repository implements RepositoryInterf } /** - * Get the amount of entries in the database + * Get the amount of entries in the database. * * @return int */ diff --git a/app/Repositories/Eloquent/ServerRepository.php b/app/Repositories/Eloquent/ServerRepository.php index f448f0b78..e900c92dd 100644 --- a/app/Repositories/Eloquent/ServerRepository.php +++ b/app/Repositories/Eloquent/ServerRepository.php @@ -330,7 +330,7 @@ class ServerRepository extends EloquentRepository implements ServerRepositoryInt } /** - * Get the amount of servers that are suspended + * Get the amount of servers that are suspended. * * @return int */ diff --git a/app/Traits/Controllers/PlainJavascriptInjection.php b/app/Traits/Controllers/PlainJavascriptInjection.php index eae53bfbc..f514eb1af 100644 --- a/app/Traits/Controllers/PlainJavascriptInjection.php +++ b/app/Traits/Controllers/PlainJavascriptInjection.php @@ -3,7 +3,7 @@ * Created by PhpStorm. * User: Stan * Date: 26-5-2018 - * Time: 20:56 + * Time: 20:56. */ namespace Pterodactyl\Traits\Controllers; @@ -12,13 +12,11 @@ use JavaScript; trait PlainJavascriptInjection { - /** - * Injects statistics into javascript + * Injects statistics into javascript. */ public function injectJavascript($data) { Javascript::put($data); } - -} \ No newline at end of file +} diff --git a/database/migrations/2018_05_04_123826_add_maintenance_to_nodes.php b/database/migrations/2018_05_04_123826_add_maintenance_to_nodes.php index 799f1df23..04fdf000f 100644 --- a/database/migrations/2018_05_04_123826_add_maintenance_to_nodes.php +++ b/database/migrations/2018_05_04_123826_add_maintenance_to_nodes.php @@ -14,7 +14,7 @@ class AddMaintenanceToNodes extends Migration public function up() { Schema::table('nodes', function (Blueprint $table) { - $table->boolean('maintenance_mode')->after('behind_proxy')->default(false); + $table->boolean('maintenance_mode')->after('behind_proxy')->default(false); }); } @@ -26,7 +26,7 @@ class AddMaintenanceToNodes extends Migration public function down() { Schema::table('nodes', function (Blueprint $table) { - $table->dropColumn('maintenance_mode'); + $table->dropColumn('maintenance_mode'); }); } } diff --git a/tests/Unit/Http/Controllers/Admin/StatisticsControllerTest.php b/tests/Unit/Http/Controllers/Admin/StatisticsControllerTest.php index f3a20f8ac..fe41932bd 100644 --- a/tests/Unit/Http/Controllers/Admin/StatisticsControllerTest.php +++ b/tests/Unit/Http/Controllers/Admin/StatisticsControllerTest.php @@ -3,24 +3,22 @@ * Created by PhpStorm. * User: Stan * Date: 26-5-2018 - * Time: 21:06 + * Time: 21:06. */ namespace Tests\Unit\Http\Controllers\Admin; -use Illuminate\Database\Eloquent\Builder; -use Illuminate\Routing\Controller; use Mockery as m; -use Pterodactyl\Contracts\Repository\AllocationRepositoryInterface; -use Pterodactyl\Contracts\Repository\DatabaseRepositoryInterface; -use Pterodactyl\Contracts\Repository\EggRepositoryInterface; -use Pterodactyl\Contracts\Repository\NodeRepositoryInterface; -use Pterodactyl\Contracts\Repository\ServerRepositoryInterface; -use Pterodactyl\Contracts\Repository\UserRepositoryInterface; -use Pterodactyl\Http\Controllers\Admin\StatisticsController; use Pterodactyl\Models\Node; use Tests\Assertions\ControllerAssertionsTrait; use Tests\Unit\Http\Controllers\ControllerTestCase; +use Pterodactyl\Contracts\Repository\EggRepositoryInterface; +use Pterodactyl\Http\Controllers\Admin\StatisticsController; +use Pterodactyl\Contracts\Repository\NodeRepositoryInterface; +use Pterodactyl\Contracts\Repository\UserRepositoryInterface; +use Pterodactyl\Contracts\Repository\ServerRepositoryInterface; +use Pterodactyl\Contracts\Repository\DatabaseRepositoryInterface; +use Pterodactyl\Contracts\Repository\AllocationRepositoryInterface; class StatisticsControllerTest extends ControllerTestCase { @@ -88,7 +86,7 @@ class StatisticsControllerTest extends ControllerTestCase 'disk' => [ 'value' => 1024, 'max' => 512, - ] + ], ]); $controller->shouldReceive('injectJavascript')->once(); @@ -106,8 +104,7 @@ class StatisticsControllerTest extends ControllerTestCase $this->eggRepository, $this->nodeRepository, $this->serverRepository, - $this->userRepository] + $this->userRepository, ] ); } - -} \ No newline at end of file +} From d73e5a2274a3bdf44821451c3ac51f1ab139da95 Mon Sep 17 00:00:00 2001 From: Jacob Gee-Clarke Date: Sat, 2 Jun 2018 22:34:01 +0100 Subject: [PATCH 02/21] Fixed my fix to fix the 500 error on /api/application/nodes when not specifying a daemon_base (#1182) --- app/Http/Requests/Api/Application/Nodes/StoreNodeRequest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Http/Requests/Api/Application/Nodes/StoreNodeRequest.php b/app/Http/Requests/Api/Application/Nodes/StoreNodeRequest.php index 20a29f199..0f39fd2f8 100644 --- a/app/Http/Requests/Api/Application/Nodes/StoreNodeRequest.php +++ b/app/Http/Requests/Api/Application/Nodes/StoreNodeRequest.php @@ -74,7 +74,7 @@ class StoreNodeRequest extends ApplicationApiRequest $response = parent::validated(); $response['daemonListen'] = $response['daemon_listen']; $response['daemonSFTP'] = $response['daemon_sftp']; - $response['daemonBase'] = $response['daemon_base']; + $response['daemonBase'] = $response['daemon_base'] ?? (new Node)->getAttribute('daemonBase'); unset($response['daemon_base'], $response['daemon_listen'], $response['daemon_sftp']); From 8f0c740a15e8b338c97b47277cdc9c71ca88a753 Mon Sep 17 00:00:00 2001 From: Lance Pioch Date: Sun, 3 Jun 2018 23:36:35 -0400 Subject: [PATCH 03/21] Update issue templates (#1188) * Update issue templates * Delete ISSUE_TEMPLATE.md --- .github/ISSUE_TEMPLATE.md | 26 ------------------ .github/ISSUE_TEMPLATE/---bug-report.md | 27 +++++++++++++++++++ .github/ISSUE_TEMPLATE/---feature-request.md | 17 ++++++++++++ .github/ISSUE_TEMPLATE/--installation-help.md | 8 ++++++ .github/ISSUE_TEMPLATE/bug-report.md | 27 +++++++++++++++++++ .github/ISSUE_TEMPLATE/feature-request.md | 17 ++++++++++++ 6 files changed, 96 insertions(+), 26 deletions(-) delete mode 100644 .github/ISSUE_TEMPLATE.md create mode 100644 .github/ISSUE_TEMPLATE/---bug-report.md create mode 100644 .github/ISSUE_TEMPLATE/---feature-request.md create mode 100644 .github/ISSUE_TEMPLATE/--installation-help.md create mode 100644 .github/ISSUE_TEMPLATE/bug-report.md create mode 100644 .github/ISSUE_TEMPLATE/feature-request.md diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md deleted file mode 100644 index 9b959e58f..000000000 --- a/.github/ISSUE_TEMPLATE.md +++ /dev/null @@ -1,26 +0,0 @@ - - - -* Panel or Daemon: -* Version of Panel/Daemon: -* Server's OS: -* Your Computer's OS & Browser: - ------------------------- - - diff --git a/.github/ISSUE_TEMPLATE/---bug-report.md b/.github/ISSUE_TEMPLATE/---bug-report.md new file mode 100644 index 000000000..6d69080b1 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/---bug-report.md @@ -0,0 +1,27 @@ +--- +name: "\U0001F41B Bug Report" +about: Create a report to help us resolve a bug or error + +--- + +**Background (please complete the following information):** +* Panel or Daemon: +* Version of Panel/Daemon: +* Server's OS: +* Your Computer's OS & Browser: + +**Describe the bug** +A clear and concise description of what the bug is. +Please provide additional information too, depending on what you have issues with: +Panel: `php -v` (the php version in use). +Daemon: `uname -a` and `docker info` (your kernel version and information regarding docker) + +**To Reproduce** +Steps to reproduce the behavior: +1. Go to '...' +2. Click on '....' +3. Scroll down to '....' +4. See error + +**Expected behavior** +A clear and concise description of what you expected to happen. If applicable, add screenshots or a recording to help explain your problem. diff --git a/.github/ISSUE_TEMPLATE/---feature-request.md b/.github/ISSUE_TEMPLATE/---feature-request.md new file mode 100644 index 000000000..64fa679ba --- /dev/null +++ b/.github/ISSUE_TEMPLATE/---feature-request.md @@ -0,0 +1,17 @@ +--- +name: "\U0001F680 Feature Request" +about: Suggest an idea for this project + +--- + +**Is your feature request related to a problem? Please describe.** +A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] + +**Describe the solution you'd like** +A clear and concise description of what you want to happen. + +**Describe alternatives you've considered** +A clear and concise description of any alternative solutions or features you've considered. + +**Additional context** +Add any other context or screenshots about the feature request here. diff --git a/.github/ISSUE_TEMPLATE/--installation-help.md b/.github/ISSUE_TEMPLATE/--installation-help.md new file mode 100644 index 000000000..fa10ca975 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/--installation-help.md @@ -0,0 +1,8 @@ +--- +name: "⛔ Installation Help" +about: 'Visit our Discord for installation help: https://pterodactyl.io/discord' + +--- + +We use GitHub issues only to discuss about Pterodactyl bugs and new features. For +this kind of questions about using Pterodactyl, please visit our Discord for assistance: https://pterodactyl.io/discord diff --git a/.github/ISSUE_TEMPLATE/bug-report.md b/.github/ISSUE_TEMPLATE/bug-report.md new file mode 100644 index 000000000..5cb3eaef7 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug-report.md @@ -0,0 +1,27 @@ +--- +name: Bug Report +about: Create a report to help us resolve a bug or error + +--- + +**Background (please complete the following information):** +* Panel or Daemon: +* Version of Panel/Daemon: +* Server's OS: +* Your Computer's OS & Browser: + +**Describe the bug** +A clear and concise description of what the bug is. +Please provide additional information too, depending on what you have issues with: +Panel: `php -v` (the php version in use). +Daemon: `uname -a` and `docker info` (your kernel version and information regarding docker) + +**To Reproduce** +Steps to reproduce the behavior: +1. Go to '...' +2. Click on '....' +3. Scroll down to '....' +4. See error + +**Expected behavior** +A clear and concise description of what you expected to happen. If applicable, add screenshots or a recording to help explain your problem. diff --git a/.github/ISSUE_TEMPLATE/feature-request.md b/.github/ISSUE_TEMPLATE/feature-request.md new file mode 100644 index 000000000..817c80c1f --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature-request.md @@ -0,0 +1,17 @@ +--- +name: Feature Request +about: Suggest an idea for this project + +--- + +**Is your feature request related to a problem? Please describe.** +A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] + +**Describe the solution you'd like** +A clear and concise description of what you want to happen. + +**Describe alternatives you've considered** +A clear and concise description of any alternative solutions or features you've considered. + +**Additional context** +Add any other context or screenshots about the feature request here. From f54dc24cf440c769c1b913e4d360960644179367 Mon Sep 17 00:00:00 2001 From: Lance Pioch Date: Sun, 3 Jun 2018 23:40:38 -0400 Subject: [PATCH 04/21] Remove dupe issues thanks Microsoft (#1189) * Delete bug-report.md * Delete feature-request.md --- .github/ISSUE_TEMPLATE/bug-report.md | 27 ----------------------- .github/ISSUE_TEMPLATE/feature-request.md | 17 -------------- 2 files changed, 44 deletions(-) delete mode 100644 .github/ISSUE_TEMPLATE/bug-report.md delete mode 100644 .github/ISSUE_TEMPLATE/feature-request.md diff --git a/.github/ISSUE_TEMPLATE/bug-report.md b/.github/ISSUE_TEMPLATE/bug-report.md deleted file mode 100644 index 5cb3eaef7..000000000 --- a/.github/ISSUE_TEMPLATE/bug-report.md +++ /dev/null @@ -1,27 +0,0 @@ ---- -name: Bug Report -about: Create a report to help us resolve a bug or error - ---- - -**Background (please complete the following information):** -* Panel or Daemon: -* Version of Panel/Daemon: -* Server's OS: -* Your Computer's OS & Browser: - -**Describe the bug** -A clear and concise description of what the bug is. -Please provide additional information too, depending on what you have issues with: -Panel: `php -v` (the php version in use). -Daemon: `uname -a` and `docker info` (your kernel version and information regarding docker) - -**To Reproduce** -Steps to reproduce the behavior: -1. Go to '...' -2. Click on '....' -3. Scroll down to '....' -4. See error - -**Expected behavior** -A clear and concise description of what you expected to happen. If applicable, add screenshots or a recording to help explain your problem. diff --git a/.github/ISSUE_TEMPLATE/feature-request.md b/.github/ISSUE_TEMPLATE/feature-request.md deleted file mode 100644 index 817c80c1f..000000000 --- a/.github/ISSUE_TEMPLATE/feature-request.md +++ /dev/null @@ -1,17 +0,0 @@ ---- -name: Feature Request -about: Suggest an idea for this project - ---- - -**Is your feature request related to a problem? Please describe.** -A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] - -**Describe the solution you'd like** -A clear and concise description of what you want to happen. - -**Describe alternatives you've considered** -A clear and concise description of any alternative solutions or features you've considered. - -**Additional context** -Add any other context or screenshots about the feature request here. From 5f90d841d063852b7e3692359a35deb8f5258e51 Mon Sep 17 00:00:00 2001 From: Jayden Downes <35357527+JaydenDownes@users.noreply.github.com> Date: Tue, 5 Jun 2018 10:33:34 +0800 Subject: [PATCH 05/21] Fixed Search Bar Scaling in Firefox (#1187) Fixed scaling issue with Firefox where it would scale the search bar to 30% of the width of the box-tools container instead of 30% of the row container. (Note this is not a fix for the issue with it appearing on a separate line on mobiles). --- public/themes/pterodactyl/css/pterodactyl.css | 5 +++++ resources/themes/pterodactyl/base/index.blade.php | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/public/themes/pterodactyl/css/pterodactyl.css b/public/themes/pterodactyl/css/pterodactyl.css index 41f163f3b..a4e4c4cf7 100644 --- a/public/themes/pterodactyl/css/pterodactyl.css +++ b/public/themes/pterodactyl/css/pterodactyl.css @@ -474,6 +474,11 @@ label.control-label > span.field-optional:before { width: auto; } +.search01 { + width: 30%; +} + .number-info-box-content { padding: 15px 10px 0; } + diff --git a/resources/themes/pterodactyl/base/index.blade.php b/resources/themes/pterodactyl/base/index.blade.php index 28f4c4d57..1fd44caa7 100644 --- a/resources/themes/pterodactyl/base/index.blade.php +++ b/resources/themes/pterodactyl/base/index.blade.php @@ -23,10 +23,10 @@

@lang('base.index.list')

-
+
- +
From ad9ed5ea0049e9fd267648b5cafddd3b7123a6f5 Mon Sep 17 00:00:00 2001 From: Stan Date: Sat, 30 Jun 2018 22:23:48 +0200 Subject: [PATCH 06/21] Fixed the permission (#1217) --- CHANGELOG.md | 1 + resources/themes/pterodactyl/layouts/master.blade.php | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 27eca5765..5b1142c87 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,7 @@ This project follows [Semantic Versioning](http://semver.org) guidelines. ### Fixed * Hitting Ctrl+Z when editing a file on the web now works as expected. * Logo now links to the correct location on all pages. +* Permissions checking to determine if a user can see the task management page now works correctly. ### Changed * Attempting to upload a folder via the web file manager will now display a warning telling the user to use SFTP. diff --git a/resources/themes/pterodactyl/layouts/master.blade.php b/resources/themes/pterodactyl/layouts/master.blade.php index 644cb5bca..15d88b96b 100644 --- a/resources/themes/pterodactyl/layouts/master.blade.php +++ b/resources/themes/pterodactyl/layouts/master.blade.php @@ -146,7 +146,7 @@ @endcan - @can('list-tasks', $server) + @can('list-schedules', $server)
  • Date: Sat, 30 Jun 2018 22:25:40 +0200 Subject: [PATCH 07/21] Fix environment_variables name (#1212) --- CHANGELOG.md | 1 + app/Services/Servers/EnvironmentService.php | 2 +- tests/Unit/Services/Servers/EnvironmentServiceTest.php | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5b1142c87..0e397ace2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,7 @@ This project follows [Semantic Versioning](http://semver.org) guidelines. * Hitting Ctrl+Z when editing a file on the web now works as expected. * Logo now links to the correct location on all pages. * Permissions checking to determine if a user can see the task management page now works correctly. +* Fixed `pterodactyl.environment_variables` to be used correctly for global environment variables. The wrong config variable name was being using previously. ### Changed * Attempting to upload a folder via the web file manager will now display a warning telling the user to use SFTP. diff --git a/app/Services/Servers/EnvironmentService.php b/app/Services/Servers/EnvironmentService.php index 85eb69bb8..b17076e07 100644 --- a/app/Services/Servers/EnvironmentService.php +++ b/app/Services/Servers/EnvironmentService.php @@ -78,7 +78,7 @@ class EnvironmentService } // Process variables set in the configuration file. - foreach ($this->config->get('pterodactyl.environment_mappings', []) as $key => $object) { + foreach ($this->config->get('pterodactyl.environment_variables', []) as $key => $object) { if (is_callable($object)) { $variables[$key] = call_user_func($object, $server); } else { diff --git a/tests/Unit/Services/Servers/EnvironmentServiceTest.php b/tests/Unit/Services/Servers/EnvironmentServiceTest.php index 0f7000209..acce1c683 100644 --- a/tests/Unit/Services/Servers/EnvironmentServiceTest.php +++ b/tests/Unit/Services/Servers/EnvironmentServiceTest.php @@ -12,7 +12,7 @@ use Pterodactyl\Contracts\Repository\ServerRepositoryInterface; class EnvironmentServiceTest extends TestCase { - const CONFIG_MAPPING = 'pterodactyl.environment_mappings'; + const CONFIG_MAPPING = 'pterodactyl.environment_variables'; /** * @var \Illuminate\Contracts\Config\Repository|\Mockery\Mock From 1da05a2ee26b917efa3e470103e3ac89dfc55faa Mon Sep 17 00:00:00 2001 From: Matthew Penner Date: Sat, 30 Jun 2018 14:25:51 -0600 Subject: [PATCH 08/21] Fix typo (#1210) --- .../themes/pterodactyl/admin/servers/view/delete.blade.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/themes/pterodactyl/admin/servers/view/delete.blade.php b/resources/themes/pterodactyl/admin/servers/view/delete.blade.php index ec1ccaebe..ec33ef037 100644 --- a/resources/themes/pterodactyl/admin/servers/view/delete.blade.php +++ b/resources/themes/pterodactyl/admin/servers/view/delete.blade.php @@ -62,7 +62,7 @@

    Force Delete Server

  • -

    This action will attempt to delete the server from both the panel and daemon. The the daemon does not respond, or reports an error the deletion will continue.

    +

    This action will attempt to delete the server from both the panel and daemon. If the daemon does not respond, or reports an error the deletion will continue.

    Deleting a server is an irreversible action. All server data (including files and users) will be removed from the system. This method may leave dangling files on your daemon if it reports an error.