Skip to content

Commit fd24729

Browse files
committed
Merge branch 'feature/PTDL-472' of https://github.com/Pterodactyl/Panel into feature/PTDL-472
2 parents 364adb1 + 340193c commit fd24729

15 files changed

+165
-166
lines changed

app/Console/Commands/AddLocation.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -31,12 +31,12 @@ class AddLocation extends Command
3131
{
3232
protected $data = [];
3333

34-
/**
35-
* The name and signature of the console command.
36-
*
37-
* @var string
38-
*/
39-
protected $signature = 'pterodactyl:location
34+
/**
35+
* The name and signature of the console command.
36+
*
37+
* @var string
38+
*/
39+
protected $signature = 'pterodactyl:location
4040
{--short= : The shortcode name of this location (ex. us1).}
4141
{--long= : A longer description of this location.}';
4242

app/Events/Auth/FailedCaptcha.php

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,26 @@
11
<?php
22
/**
3-
* Pterodactyl - Panel
4-
* Copyright (c) 2015 - 2017 Dane Everitt <dane@daneeveritt.com>.
5-
*
6-
* Permission is hereby granted, free of charge, to any person obtaining a copy
7-
* of this software and associated documentation files (the "Software"), to deal
8-
* in the Software without restriction, including without limitation the rights
9-
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10-
* copies of the Software, and to permit persons to whom the Software is
11-
* furnished to do so, subject to the following conditions:
12-
*
13-
* The above copyright notice and this permission notice shall be included in all
14-
* copies or substantial portions of the Software.
15-
*
16-
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17-
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18-
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19-
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20-
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21-
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22-
* SOFTWARE.
23-
*/
3+
* Pterodactyl - Panel
4+
* Copyright (c) 2015 - 2017 Dane Everitt <dane@daneeveritt.com>.
5+
*
6+
* Permission is hereby granted, free of charge, to any person obtaining a copy
7+
* of this software and associated documentation files (the "Software"), to deal
8+
* in the Software without restriction, including without limitation the rights
9+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10+
* copies of the Software, and to permit persons to whom the Software is
11+
* furnished to do so, subject to the following conditions:
12+
*
13+
* The above copyright notice and this permission notice shall be included in all
14+
* copies or substantial portions of the Software.
15+
*
16+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22+
* SOFTWARE.
23+
*/
2424

2525
namespace Pterodactyl\Events\Auth;
2626

app/Http/Controllers/Admin/VariableController.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,14 +25,14 @@
2525
namespace Pterodactyl\Http\Controllers\Admin;
2626

2727
use Prologue\Alerts\AlertsMessageBag;
28-
use Pterodactyl\Http\Controllers\Controller;
29-
use Pterodactyl\Contracts\Repository\ServiceOptionRepositoryInterface;
30-
use Pterodactyl\Http\Requests\Admin\OptionVariableFormRequest;
3128
use Pterodactyl\Models\ServiceOption;
3229
use Pterodactyl\Models\ServiceVariable;
30+
use Pterodactyl\Http\Controllers\Controller;
31+
use Pterodactyl\Http\Requests\Admin\OptionVariableFormRequest;
3332
use Pterodactyl\Repositories\Eloquent\ServiceVariableRepository;
34-
use Pterodactyl\Services\Services\Variables\VariableCreationService;
3533
use Pterodactyl\Services\Services\Variables\VariableUpdateService;
34+
use Pterodactyl\Services\Services\Variables\VariableCreationService;
35+
use Pterodactyl\Contracts\Repository\ServiceOptionRepositoryInterface;
3636

3737
class VariableController extends Controller
3838
{

app/Http/Controllers/Base/AccountController.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -67,15 +67,15 @@ public function update(Request $request)
6767

6868
$data['password'] = $request->input('new_password');
6969

70-
// Request to update account Email
70+
// Request to update account Email
7171
} elseif ($request->input('do_action') === 'email') {
7272
$data['email'] = $request->input('new_email');
7373

74-
// Request to update account Identity
74+
// Request to update account Identity
7575
} elseif ($request->input('do_action') === 'identity') {
7676
$data = $request->only(['name_first', 'name_last', 'username']);
7777

78-
// Unknown, hit em with a 404
78+
// Unknown, hit em with a 404
7979
} else {
8080
return abort(404);
8181
}

app/Models/ServerVariable.php

Lines changed: 42 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -42,53 +42,53 @@ class ServerVariable extends Model
4242
*/
4343
protected $guarded = ['id', 'created_at', 'updated_at'];
4444

45-
/**
46-
* Cast values to correct type.
47-
*
48-
* @var array
49-
*/
50-
protected $casts = [
45+
/**
46+
* Cast values to correct type.
47+
*
48+
* @var array
49+
*/
50+
protected $casts = [
5151
'server_id' => 'integer',
5252
'variable_id' => 'integer',
5353
];
5454

55-
/**
56-
* Determine if variable is viewable by users.
57-
*
58-
* @return bool
59-
*/
60-
public function getUserCanViewAttribute()
61-
{
62-
return (bool) $this->variable->user_viewable;
63-
}
55+
/**
56+
* Determine if variable is viewable by users.
57+
*
58+
* @return bool
59+
*/
60+
public function getUserCanViewAttribute()
61+
{
62+
return (bool) $this->variable->user_viewable;
63+
}
6464

65-
/**
66-
* Determine if variable is editable by users.
67-
*
68-
* @return bool
69-
*/
70-
public function getUserCanEditAttribute()
71-
{
72-
return (bool) $this->variable->user_editable;
73-
}
65+
/**
66+
* Determine if variable is editable by users.
67+
*
68+
* @return bool
69+
*/
70+
public function getUserCanEditAttribute()
71+
{
72+
return (bool) $this->variable->user_editable;
73+
}
7474

75-
/**
76-
* Determine if variable is required.
77-
*
78-
* @return bool
79-
*/
80-
public function getRequiredAttribute()
81-
{
82-
return $this->variable->required;
83-
}
75+
/**
76+
* Determine if variable is required.
77+
*
78+
* @return bool
79+
*/
80+
public function getRequiredAttribute()
81+
{
82+
return $this->variable->required;
83+
}
8484

85-
/**
86-
* Returns information about a given variables parent.
87-
*
88-
* @return \Illuminate\Database\Eloquent\Relations\BelongsTo
89-
*/
90-
public function variable()
91-
{
92-
return $this->belongsTo(ServiceVariable::class, 'variable_id');
93-
}
85+
/**
86+
* Returns information about a given variables parent.
87+
*
88+
* @return \Illuminate\Database\Eloquent\Relations\BelongsTo
89+
*/
90+
public function variable()
91+
{
92+
return $this->belongsTo(ServiceVariable::class, 'variable_id');
93+
}
9494
}

app/Providers/RepositoryServiceProvider.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,7 @@
2525
namespace Pterodactyl\Providers;
2626

2727
use Illuminate\Support\ServiceProvider;
28-
use Pterodactyl\Contracts\Repository\ServiceVariableRepositoryInterface;
2928
use Pterodactyl\Repositories\Eloquent\NodeRepository;
30-
use Pterodactyl\Repositories\Eloquent\ServiceVariableRepository;
3129
use Pterodactyl\Repositories\Eloquent\UserRepository;
3230
use Pterodactyl\Repositories\Eloquent\ApiKeyRepository;
3331
use Pterodactyl\Repositories\Eloquent\ServerRepository;
@@ -46,6 +44,7 @@
4644
use Pterodactyl\Repositories\Eloquent\OptionVariableRepository;
4745
use Pterodactyl\Repositories\Eloquent\ServerVariableRepository;
4846
use Pterodactyl\Contracts\Repository\ServiceRepositoryInterface;
47+
use Pterodactyl\Repositories\Eloquent\ServiceVariableRepository;
4948
use Pterodactyl\Contracts\Repository\DatabaseRepositoryInterface;
5049
use Pterodactyl\Contracts\Repository\LocationRepositoryInterface;
5150
use Pterodactyl\Contracts\Repository\AllocationRepositoryInterface;
@@ -54,6 +53,7 @@
5453
use Pterodactyl\Contracts\Repository\ServiceOptionRepositoryInterface;
5554
use Pterodactyl\Contracts\Repository\OptionVariableRepositoryInterface;
5655
use Pterodactyl\Contracts\Repository\ServerVariableRepositoryInterface;
56+
use Pterodactyl\Contracts\Repository\ServiceVariableRepositoryInterface;
5757
use Pterodactyl\Contracts\Repository\Daemon\ConfigurationRepositoryInterface;
5858
use Pterodactyl\Repositories\Daemon\ServerRepository as DaemonServerRepository;
5959
use Pterodactyl\Contracts\Repository\Daemon\ServerRepositoryInterface as DaemonServerRepositoryInterface;

app/Services/Services/Options/OptionUpdateService.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,9 @@
2424

2525
namespace Pterodactyl\Services\Services\Options;
2626

27+
use Pterodactyl\Models\ServiceOption;
2728
use Pterodactyl\Contracts\Repository\ServiceOptionRepositoryInterface;
2829
use Pterodactyl\Exceptions\Services\ServiceOption\NoParentConfigurationFoundException;
29-
use Pterodactyl\Models\ServiceOption;
3030

3131
class OptionUpdateService
3232
{

app/Services/Services/Variables/VariableCreationService.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,11 @@
2424

2525
namespace Pterodactyl\Services\Services\Variables;
2626

27+
use Pterodactyl\Models\ServiceOption;
28+
use Pterodactyl\Models\ServiceVariable;
2729
use Pterodactyl\Contracts\Repository\ServiceOptionRepositoryInterface;
2830
use Pterodactyl\Contracts\Repository\ServiceVariableRepositoryInterface;
2931
use Pterodactyl\Exceptions\Services\ServiceVariable\ReservedVariableNameException;
30-
use Pterodactyl\Models\ServiceOption;
31-
use Pterodactyl\Models\ServiceVariable;
3232

3333
class VariableCreationService
3434
{

database/migrations/2016_10_23_201624_add_foreign_allocations.php

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -24,24 +24,24 @@ public function up()
2424
});
2525
}
2626

27-
/**
28-
* Reverse the migrations.
29-
*
30-
* @return void
31-
*/
32-
public function down()
33-
{
34-
Schema::table('allocations', function (Blueprint $table) {
35-
$table->dropForeign('allocations_assigned_to_foreign');
36-
$table->dropForeign('allocations_node_foreign');
27+
/**
28+
* Reverse the migrations.
29+
*
30+
* @return void
31+
*/
32+
public function down()
33+
{
34+
Schema::table('allocations', function (Blueprint $table) {
35+
$table->dropForeign('allocations_assigned_to_foreign');
36+
$table->dropForeign('allocations_node_foreign');
3737

38-
$table->dropIndex('allocations_assigned_to_foreign');
39-
$table->dropIndex('allocations_node_foreign');
40-
});
38+
$table->dropIndex('allocations_assigned_to_foreign');
39+
$table->dropIndex('allocations_node_foreign');
40+
});
4141

42-
DB::statement('ALTER TABLE allocations
42+
DB::statement('ALTER TABLE allocations
4343
MODIFY COLUMN assigned_to MEDIUMINT(8) UNSIGNED NULL,
4444
MODIFY COLUMN node MEDIUMINT(8) UNSIGNED NOT NULL
4545
');
46-
}
46+
}
4747
}

database/migrations/2016_10_23_202703_add_foreign_api_permissions.php

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -20,18 +20,18 @@ public function up()
2020
});
2121
}
2222

23-
/**
24-
* Reverse the migrations.
25-
*
26-
* @return void
27-
*/
28-
public function down()
29-
{
30-
Schema::table('api_permissions', function (Blueprint $table) {
31-
$table->dropForeign('api_permissions_key_id_foreign');
32-
$table->dropIndex('api_permissions_key_id_foreign');
33-
});
23+
/**
24+
* Reverse the migrations.
25+
*
26+
* @return void
27+
*/
28+
public function down()
29+
{
30+
Schema::table('api_permissions', function (Blueprint $table) {
31+
$table->dropForeign('api_permissions_key_id_foreign');
32+
$table->dropIndex('api_permissions_key_id_foreign');
33+
});
3434

35-
DB::statement('ALTER TABLE api_permissions MODIFY key_id MEDIUMINT(8) UNSIGNED NOT NULL');
36-
}
35+
DB::statement('ALTER TABLE api_permissions MODIFY key_id MEDIUMINT(8) UNSIGNED NOT NULL');
36+
}
3737
}

0 commit comments

Comments
 (0)