From 7eb7377dd5793b39049210bcaf1bb3dfe50022c8 Mon Sep 17 00:00:00 2001 From: Dane Everitt Date: Fri, 28 Apr 2017 10:19:04 -0400 Subject: [PATCH] I really need to stop trying to override PHP reserved keywords... --- CHANGELOG.md | 2 +- app/Http/Controllers/Daemon/ServiceController.php | 2 +- app/Http/Controllers/Server/SubuserController.php | 4 ++-- app/Models/Permission.php | 2 +- app/Repositories/SubuserRepository.php | 4 ++-- routes/daemon.php | 2 +- 6 files changed, 8 insertions(+), 8 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 532e6bad..badbb9e9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -62,7 +62,7 @@ This project follows [Semantic Versioning](http://semver.org) guidelines. * Servers that a user is assocaited with as a subuser are now displayed in addition to owned servers when listing users in the Admin CP. ### Changed -* Subuser permissions are now stored in `Permission::list()` to make views way cleaner and make adding to views significantly cleaner. +* Subuser permissions are now stored in `Permission::listPermissions()` to make views way cleaner and make adding to views significantly cleaner. * `[pre.7]` — Sidebar for file manager now is a single link rather than a dropdown. * Attempting to reset a password for an account that does not exist no longer returns an error, rather it displays a success message. Failed resets trigger a `Pterodactyl\Events\Auth\FailedPasswordReset` event that can be caught if needed to perform other actions. * Servers are no longer queued for deletion due to the general hassle and extra logic required. diff --git a/app/Http/Controllers/Daemon/ServiceController.php b/app/Http/Controllers/Daemon/ServiceController.php index 5762ecef..d461786f 100644 --- a/app/Http/Controllers/Daemon/ServiceController.php +++ b/app/Http/Controllers/Daemon/ServiceController.php @@ -39,7 +39,7 @@ class ServiceController extends Controller * @param \Illuminate\Http\Request $request * @return \Illuminate\Http\JsonResponse */ - public function list(Request $request) + public function listServices(Request $request) { $response = []; foreach (Service::all() as $service) { diff --git a/app/Http/Controllers/Server/SubuserController.php b/app/Http/Controllers/Server/SubuserController.php index c0c15f29..9a8b3507 100644 --- a/app/Http/Controllers/Server/SubuserController.php +++ b/app/Http/Controllers/Server/SubuserController.php @@ -79,7 +79,7 @@ class SubuserController extends Controller 'server' => $server, 'node' => $server->node, 'subuser' => $subuser, - 'permlist' => Models\Permission::list(), + 'permlist' => Models\Permission::listPermissions(), 'permissions' => $subuser->permissions->mapWithKeys(function ($item, $key) { return [$item->permission => true]; }), @@ -147,7 +147,7 @@ class SubuserController extends Controller return view('server.users.new', [ 'server' => $server, - 'permissions' => Models\Permission::list(), + 'permissions' => Models\Permission::listPermissions(), 'node' => $server->node, ]); } diff --git a/app/Models/Permission.php b/app/Models/Permission.php index a2bd58a7..c126967e 100644 --- a/app/Models/Permission.php +++ b/app/Models/Permission.php @@ -121,7 +121,7 @@ class Permission extends Model * @param array $single * @return \Illuminate\Support\Collection|array */ - public static function list($single = false) + public static function listPermissions($single = false) { if ($single) { return collect(self::$permissions)->mapWithKeys(function ($item) { diff --git a/app/Repositories/SubuserRepository.php b/app/Repositories/SubuserRepository.php index a2cd23d9..7a2aef8c 100644 --- a/app/Repositories/SubuserRepository.php +++ b/app/Repositories/SubuserRepository.php @@ -103,7 +103,7 @@ class SubuserRepository 'daemonSecret' => (string) $uuid->generate('servers', 'uuid'), ]); - $perms = Permission::list(true); + $perms = Permission::listPermissions(true); $daemonPermissions = $this->coreDaemonPermissions; foreach ($data['permissions'] as $permission) { @@ -222,7 +222,7 @@ class SubuserRepository $permission->delete(); } - $perms = Permission::list(true); + $perms = Permission::listPermissions(true); $daemonPermissions = $this->coreDaemonPermissions; foreach ($data['permissions'] as $permission) { diff --git a/routes/daemon.php b/routes/daemon.php index d5ebcee6..82619ad0 100644 --- a/routes/daemon.php +++ b/routes/daemon.php @@ -21,7 +21,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -Route::get('/services', 'ServiceController@list')->name('daemon.services'); +Route::get('/services', 'ServiceController@listServices')->name('daemon.services'); Route::get('/services/pull/{service}/{file}', 'ServiceController@pull')->name('daemon.pull'); Route::get('/packs/pull/{uuid}', 'PackController@pull')->name('daemon.pack.pull'); Route::get('/packs/pull/{uuid}/hash', 'PackController@hash')->name('daemon.pack.hash');