From 5285fa8360a6be89ae94c306088a6e7ea8ec49b1 Mon Sep 17 00:00:00 2001 From: Kamil Tekiela Date: Mon, 16 Dec 2024 00:37:18 +0000 Subject: [PATCH] Remove dead code Signed-off-by: Kamil Tekiela --- phpstan-baseline.neon | 6 ------ psalm-baseline.xml | 9 --------- src/Controllers/HomeController.php | 2 -- src/DatabaseInterface.php | 1 - src/Dbal/DbalInterface.php | 1 - src/Operations.php | 2 -- src/Plugins/Auth/AuthenticationHttp.php | 5 ----- 7 files changed, 26 deletions(-) diff --git a/phpstan-baseline.neon b/phpstan-baseline.neon index c4a04c1246..52fe2cf058 100644 --- a/phpstan-baseline.neon +++ b/phpstan-baseline.neon @@ -11892,12 +11892,6 @@ parameters: count: 1 path: src/Plugins/Auth/AuthenticationHttp.php - - - message: '#^Property PhpMyAdmin\\Plugins\\AuthenticationPlugin\:\:\$user \(string\) does not accept mixed\.$#' - identifier: assign.propertyType - count: 1 - path: src/Plugins/Auth/AuthenticationHttp.php - - message: ''' #^Call to deprecated method getInstance\(\) of class PhpMyAdmin\\Config\: diff --git a/psalm-baseline.xml b/psalm-baseline.xml index 8cdb2db30f..acbab945c9 100644 --- a/psalm-baseline.xml +++ b/psalm-baseline.xml @@ -1675,7 +1675,6 @@ - config->get('ShowGitRevision') ?? true]]> @@ -1690,9 +1689,6 @@ settings['Servers'][Current::$server]]]> - - - config->get('TempDir')]]> @@ -7017,14 +7013,9 @@ - - - user]]> - password]]> - user]]> diff --git a/src/Controllers/HomeController.php b/src/Controllers/HomeController.php index d42570425a..98a21fd0ae 100644 --- a/src/Controllers/HomeController.php +++ b/src/Controllers/HomeController.php @@ -66,7 +66,6 @@ final class HomeController implements InvocableController } $GLOBALS['message'] ??= null; - $GLOBALS['show_query'] ??= null; if ($request->isAjax() && ! empty($_REQUEST['access_time'])) { return $this->response->response(); @@ -79,7 +78,6 @@ final class HomeController implements InvocableController // The DB is defined here and sent to the JS front-end to refresh the DB tree Current::$database = $request->getParsedBodyParamAsString('db', ''); Current::$table = ''; - $GLOBALS['show_query'] = '1'; if (Current::$server > 0 && $this->dbi->isSuperUser()) { $this->dbi->selectDb('mysql'); diff --git a/src/DatabaseInterface.php b/src/DatabaseInterface.php index ddfa4102fa..f1c3bade58 100644 --- a/src/DatabaseInterface.php +++ b/src/DatabaseInterface.php @@ -1776,7 +1776,6 @@ class DatabaseInterface implements DbalInterface /** * returns last inserted auto_increment id for given $link - * or $GLOBALS['userlink'] */ public function insertId(ConnectionType $connectionType = ConnectionType::User): int { diff --git a/src/Dbal/DbalInterface.php b/src/Dbal/DbalInterface.php index 9c37e9d14c..7c8a89af84 100644 --- a/src/Dbal/DbalInterface.php +++ b/src/Dbal/DbalInterface.php @@ -476,7 +476,6 @@ interface DbalInterface /** * returns last inserted auto_increment id for given $link - * or $GLOBALS['userlink'] */ public function insertId(ConnectionType $connectionType = ConnectionType::User): int; diff --git a/src/Operations.php b/src/Operations.php index 319f6db523..249a6fea93 100644 --- a/src/Operations.php +++ b/src/Operations.php @@ -210,7 +210,6 @@ class Operations isset($_POST['drop_if_exists']) && $_POST['drop_if_exists'] === 'true', ) ) { - $GLOBALS['_error'] = true; break; } @@ -284,7 +283,6 @@ class Operations true, ); if (! $copyingSucceeded) { - $GLOBALS['_error'] = true; break; } } diff --git a/src/Plugins/Auth/AuthenticationHttp.php b/src/Plugins/Auth/AuthenticationHttp.php index db08fe93d4..c120fdf4a8 100644 --- a/src/Plugins/Auth/AuthenticationHttp.php +++ b/src/Plugins/Auth/AuthenticationHttp.php @@ -102,11 +102,6 @@ class AuthenticationHttp extends AuthenticationPlugin */ public function readCredentials(): bool { - // Grabs the $PHP_AUTH_USER variable - if (isset($GLOBALS['PHP_AUTH_USER'])) { - $this->user = $GLOBALS['PHP_AUTH_USER']; - } - if ($this->user === '') { if (Core::getEnv('PHP_AUTH_USER') !== '') { $this->user = Core::getEnv('PHP_AUTH_USER');