Replace Config::getInstance with DI in controllers
Signed-off-by: Maurício Meneghini Fauth <mauricio@mfauth.net>
This commit is contained in:
parent
c2ba3c9211
commit
1a25a06d0d
@ -64,7 +64,7 @@ return [
|
||||
],
|
||||
CheckRelationsController::class => [
|
||||
'class' => CheckRelationsController::class,
|
||||
'arguments' => ['$response' => '@response', '$relation' => '@relation'],
|
||||
'arguments' => ['$response' => '@response', '$relation' => '@relation', '$config' => '@config'],
|
||||
],
|
||||
CollationConnectionController::class => [
|
||||
'class' => CollationConnectionController::class,
|
||||
@ -80,7 +80,11 @@ return [
|
||||
],
|
||||
Console\Bookmark\AddController::class => [
|
||||
'class' => Console\Bookmark\AddController::class,
|
||||
'arguments' => ['$response' => '@response', '$bookmarkRepository' => '@bookmarkRepository'],
|
||||
'arguments' => [
|
||||
'$response' => '@response',
|
||||
'$bookmarkRepository' => '@bookmarkRepository',
|
||||
'$config' => '@config',
|
||||
],
|
||||
],
|
||||
Console\Bookmark\RefreshController::class => [
|
||||
'class' => Console\Bookmark\RefreshController::class,
|
||||
@ -96,7 +100,11 @@ return [
|
||||
],
|
||||
Database\CentralColumnsController::class => [
|
||||
'class' => Database\CentralColumnsController::class,
|
||||
'arguments' => ['$response' => '@response', '$centralColumns' => '@central_columns'],
|
||||
'arguments' => [
|
||||
'$response' => '@response',
|
||||
'$centralColumns' => '@central_columns',
|
||||
'$config' => '@config',
|
||||
],
|
||||
],
|
||||
Database\DataDictionaryController::class => [
|
||||
'class' => Database\DataDictionaryController::class,
|
||||
@ -144,6 +152,7 @@ return [
|
||||
'$dbi' => '@dbi',
|
||||
'$pageSettings' => '@' . PageSettings::class,
|
||||
'$dbTableExists' => '@' . DbTableExists::class,
|
||||
'$config' => '@config',
|
||||
],
|
||||
],
|
||||
Database\MultiTableQuery\QueryController::class => [
|
||||
@ -177,11 +186,17 @@ return [
|
||||
'$relationCleanup' => '@relation_cleanup',
|
||||
'$dbi' => '@dbi',
|
||||
'$dbTableExists' => '@' . DbTableExists::class,
|
||||
'$config' => '@config',
|
||||
],
|
||||
],
|
||||
Database\PrivilegesController::class => [
|
||||
'class' => Database\PrivilegesController::class,
|
||||
'arguments' => ['$response' => '@response', '$privileges' => '@server_privileges', '$dbi' => '@dbi'],
|
||||
'arguments' => [
|
||||
'$response' => '@response',
|
||||
'$privileges' => '@server_privileges',
|
||||
'$dbi' => '@dbi',
|
||||
'$config' => '@config',
|
||||
],
|
||||
],
|
||||
Database\RoutinesController::class => [
|
||||
'class' => Database\RoutinesController::class,
|
||||
@ -192,6 +207,7 @@ return [
|
||||
'$dbi' => '@dbi',
|
||||
'$routines' => '@routines',
|
||||
'$dbTableExists' => '@' . DbTableExists::class,
|
||||
'$config' => '@config',
|
||||
],
|
||||
],
|
||||
Database\SearchController::class => [
|
||||
@ -201,6 +217,7 @@ return [
|
||||
'$template' => '@template',
|
||||
'$dbi' => '@dbi',
|
||||
'$dbTableExists' => '@' . DbTableExists::class,
|
||||
'$config' => '@config',
|
||||
],
|
||||
],
|
||||
Database\SqlAutoCompleteController::class => [
|
||||
@ -302,6 +319,7 @@ return [
|
||||
'$relationCleanup' => '@relation_cleanup',
|
||||
'$flashMessenger' => '@' . FlashMessenger::class,
|
||||
'$structureController' => '@' . Database\StructureController::class,
|
||||
'$config' => '@config',
|
||||
],
|
||||
],
|
||||
Database\Structure\FavoriteTableController::class => [
|
||||
@ -310,6 +328,7 @@ return [
|
||||
'$response' => '@response',
|
||||
'$template' => '@template',
|
||||
'$dbTableExists' => '@' . DbTableExists::class,
|
||||
'$config' => '@config',
|
||||
],
|
||||
],
|
||||
Database\Structure\RealRowCountController::class => [
|
||||
@ -339,6 +358,7 @@ return [
|
||||
'$trackingChecker' => '@tracking_checker',
|
||||
'$pageSettings' => '@' . PageSettings::class,
|
||||
'$dbTableExists' => '@' . DbTableExists::class,
|
||||
'$config' => '@config',
|
||||
],
|
||||
],
|
||||
Database\TrackingController::class => [
|
||||
@ -348,6 +368,7 @@ return [
|
||||
'$tracking' => '@tracking',
|
||||
'$dbi' => '@dbi',
|
||||
'$dbTableExists' => '@' . DbTableExists::class,
|
||||
'$config' => '@config',
|
||||
],
|
||||
],
|
||||
DatabaseController::class => [
|
||||
@ -362,6 +383,7 @@ return [
|
||||
'$errorReport' => '@error_report',
|
||||
'$errorHandler' => '@error_handler',
|
||||
'$dbi' => '@dbi',
|
||||
'$config' => '@config',
|
||||
],
|
||||
],
|
||||
Export\CheckTimeOutController::class => [
|
||||
@ -370,7 +392,7 @@ return [
|
||||
],
|
||||
Export\ExportController::class => [
|
||||
'class' => Export\ExportController::class,
|
||||
'arguments' => ['@response', '@export', '@' . ResponseFactory::class],
|
||||
'arguments' => ['@response', '@export', '@' . ResponseFactory::class, '@config'],
|
||||
],
|
||||
Export\TablesController::class => [
|
||||
'class' => Export\TablesController::class,
|
||||
@ -386,6 +408,7 @@ return [
|
||||
'$template' => '@template',
|
||||
'$model' => '@export_template_model',
|
||||
'$relation' => '@relation',
|
||||
'$config' => '@config',
|
||||
],
|
||||
],
|
||||
Export\Template\DeleteController::class => [
|
||||
@ -394,6 +417,7 @@ return [
|
||||
'$response' => '@response',
|
||||
'$model' => '@export_template_model',
|
||||
'$relation' => '@relation',
|
||||
'$config' => '@config',
|
||||
],
|
||||
],
|
||||
Export\Template\LoadController::class => [
|
||||
@ -402,6 +426,7 @@ return [
|
||||
'$response' => '@response',
|
||||
'$model' => '@export_template_model',
|
||||
'$relation' => '@relation',
|
||||
'$config' => '@config',
|
||||
],
|
||||
],
|
||||
Export\Template\UpdateController::class => [
|
||||
@ -410,6 +435,7 @@ return [
|
||||
'$response' => '@response',
|
||||
'$model' => '@export_template_model',
|
||||
'$relation' => '@relation',
|
||||
'$config' => '@config',
|
||||
],
|
||||
],
|
||||
GisDataEditorController::class => [
|
||||
@ -438,6 +464,7 @@ return [
|
||||
'$sql' => '@sql',
|
||||
'$dbi' => '@dbi',
|
||||
'$bookmarkRepository' => '@bookmarkRepository',
|
||||
'$config' => '@config',
|
||||
],
|
||||
],
|
||||
Import\SimulateDmlController::class => [
|
||||
@ -619,7 +646,7 @@ return [
|
||||
],
|
||||
Preferences\TwoFactorController::class => [
|
||||
'class' => Preferences\TwoFactorController::class,
|
||||
'arguments' => ['$response' => '@response', '$relation' => '@relation'],
|
||||
'arguments' => ['$response' => '@response', '$relation' => '@relation', '$config' => '@config'],
|
||||
],
|
||||
SchemaExportController::class => [
|
||||
'class' => SchemaExportController::class,
|
||||
@ -627,15 +654,15 @@ return [
|
||||
],
|
||||
Server\BinlogController::class => [
|
||||
'class' => Server\BinlogController::class,
|
||||
'arguments' => ['$response' => '@response', '$dbi' => '@dbi'],
|
||||
'arguments' => ['$response' => '@response', '$dbi' => '@dbi', '$config' => '@config'],
|
||||
],
|
||||
Server\CollationsController::class => [
|
||||
'class' => Server\CollationsController::class,
|
||||
'arguments' => ['$response' => '@response', '$dbi' => '@dbi'],
|
||||
'arguments' => ['$response' => '@response', '$dbi' => '@dbi', '$config' => '@config'],
|
||||
],
|
||||
Server\Databases\CreateController::class => [
|
||||
'class' => Server\Databases\CreateController::class,
|
||||
'arguments' => ['$response' => '@response', '$dbi' => '@dbi'],
|
||||
'arguments' => ['$response' => '@response', '$dbi' => '@dbi', '$config' => '@config'],
|
||||
],
|
||||
Server\Databases\DestroyController::class => [
|
||||
'class' => Server\Databases\DestroyController::class,
|
||||
@ -645,6 +672,7 @@ return [
|
||||
'$transformations' => '@transformations',
|
||||
'$relationCleanup' => '@relation_cleanup',
|
||||
'$userPrivilegesFactory' => '@' . UserPrivilegesFactory::class,
|
||||
'$config' => '@config',
|
||||
],
|
||||
],
|
||||
Server\DatabasesController::class => [
|
||||
@ -653,6 +681,7 @@ return [
|
||||
'$response' => '@response',
|
||||
'$dbi' => '@dbi',
|
||||
'$userPrivilegesFactory' => '@' . UserPrivilegesFactory::class,
|
||||
'$config' => '@config',
|
||||
],
|
||||
],
|
||||
Server\EnginesController::class => [
|
||||
@ -674,6 +703,7 @@ return [
|
||||
'$response' => '@response',
|
||||
'$dbi' => '@dbi',
|
||||
'$pageSettings' => '@' . PageSettings::class,
|
||||
'$config' => '@config',
|
||||
],
|
||||
],
|
||||
Server\PluginsController::class => [
|
||||
@ -909,6 +939,7 @@ return [
|
||||
'$dbi' => '@dbi',
|
||||
'$pageSettings' => '@' . PageSettings::class,
|
||||
'$bookmarkRepository' => '@bookmarkRepository',
|
||||
'$config' => '@config',
|
||||
],
|
||||
],
|
||||
Table\AddFieldController::class => [
|
||||
@ -948,6 +979,7 @@ return [
|
||||
'$response' => '@response',
|
||||
'$dbi' => '@dbi',
|
||||
'$dbTableExists' => '@' . DbTableExists::class,
|
||||
'$config' => '@config',
|
||||
],
|
||||
],
|
||||
Table\CreateController::class => [
|
||||
@ -967,7 +999,12 @@ return [
|
||||
],
|
||||
Table\DeleteRowsController::class => [
|
||||
'class' => Table\DeleteRowsController::class,
|
||||
'arguments' => ['$response' => '@response', '$template' => '@template', '$dbi' => '@dbi'],
|
||||
'arguments' => [
|
||||
'$response' => '@response',
|
||||
'$template' => '@template',
|
||||
'$dbi' => '@dbi',
|
||||
'$config' => '@config',
|
||||
],
|
||||
],
|
||||
Table\DropColumnConfirmationController::class => [
|
||||
'class' => Table\DropColumnConfirmationController::class,
|
||||
@ -1001,6 +1038,7 @@ return [
|
||||
'$template' => '@template',
|
||||
'$dbi' => '@dbi',
|
||||
'$dbTableExists' => '@' . DbTableExists::class,
|
||||
'$config' => '@config',
|
||||
],
|
||||
],
|
||||
Table\GetFieldController::class => [
|
||||
@ -1015,6 +1053,7 @@ return [
|
||||
'$dbi' => '@dbi',
|
||||
'$dbTableExists' => '@' . DbTableExists::class,
|
||||
'$responseFactory' => '@' . ResponseFactory::class,
|
||||
'$config' => '@config',
|
||||
],
|
||||
],
|
||||
Table\ImportController::class => [
|
||||
@ -1024,6 +1063,7 @@ return [
|
||||
'$dbi' => '@dbi',
|
||||
'$pageSettings' => '@' . PageSettings::class,
|
||||
'$dbTableExists' => '@' . DbTableExists::class,
|
||||
'$config' => '@config',
|
||||
],
|
||||
],
|
||||
Table\IndexesController::class => [
|
||||
@ -1034,6 +1074,7 @@ return [
|
||||
'$dbi' => '@dbi',
|
||||
'$indexes' => '@table_indexes',
|
||||
'$dbTableExists' => '@' . DbTableExists::class,
|
||||
'$config' => '@config',
|
||||
],
|
||||
],
|
||||
Table\IndexRenameController::class => [
|
||||
@ -1103,11 +1144,17 @@ return [
|
||||
'$relation' => '@relation',
|
||||
'$dbi' => '@dbi',
|
||||
'$dbTableExists' => '@' . DbTableExists::class,
|
||||
'$config' => '@config',
|
||||
],
|
||||
],
|
||||
Table\PrivilegesController::class => [
|
||||
'class' => Table\PrivilegesController::class,
|
||||
'arguments' => ['$response' => '@response', '$privileges' => '@server_privileges', '$dbi' => '@dbi'],
|
||||
'arguments' => [
|
||||
'$response' => '@response',
|
||||
'$privileges' => '@server_privileges',
|
||||
'$dbi' => '@dbi',
|
||||
'$config' => '@config',
|
||||
],
|
||||
],
|
||||
Table\RecentFavoriteController::class => [
|
||||
'class' => Table\RecentFavoriteController::class,
|
||||
@ -1120,6 +1167,7 @@ return [
|
||||
'$template' => '@template',
|
||||
'$relation' => '@relation',
|
||||
'$dbi' => '@dbi',
|
||||
'$config' => '@config',
|
||||
],
|
||||
],
|
||||
Table\ReplaceController::class => [
|
||||
@ -1145,6 +1193,7 @@ return [
|
||||
'$relation' => '@relation',
|
||||
'$dbi' => '@dbi',
|
||||
'$dbTableExists' => '@' . DbTableExists::class,
|
||||
'$config' => '@config',
|
||||
],
|
||||
],
|
||||
Table\SqlController::class => [
|
||||
@ -1230,7 +1279,7 @@ return [
|
||||
],
|
||||
Table\Structure\ReservedWordCheckController::class => [
|
||||
'class' => Table\Structure\ReservedWordCheckController::class,
|
||||
'arguments' => ['$response' => '@response'],
|
||||
'arguments' => ['$response' => '@response', '$config' => '@config'],
|
||||
],
|
||||
Table\Structure\SaveController::class => [
|
||||
'class' => Table\Structure\SaveController::class,
|
||||
@ -1241,6 +1290,7 @@ return [
|
||||
'$dbi' => '@dbi',
|
||||
'$structureController' => '@' . Table\StructureController::class,
|
||||
'$userPrivilegesFactory' => '@' . UserPrivilegesFactory::class,
|
||||
'$config' => '@config',
|
||||
],
|
||||
],
|
||||
Table\Structure\SpatialController::class => [
|
||||
@ -1269,6 +1319,7 @@ return [
|
||||
'$dbi' => '@dbi',
|
||||
'$pageSettings' => '@' . PageSettings::class,
|
||||
'$dbTableExists' => '@' . DbTableExists::class,
|
||||
'$config' => '@config',
|
||||
],
|
||||
],
|
||||
Table\TrackingController::class => [
|
||||
@ -1300,6 +1351,7 @@ return [
|
||||
'$relation' => '@relation',
|
||||
'$dbi' => '@dbi',
|
||||
'$dbTableExists' => '@' . DbTableExists::class,
|
||||
'$config' => '@config',
|
||||
],
|
||||
],
|
||||
TableController::class => [
|
||||
@ -1320,6 +1372,7 @@ return [
|
||||
'$response' => '@response',
|
||||
'$themeManager' => '@' . PhpMyAdmin\Theme\ThemeManager::class,
|
||||
'$userPreferences' => '@user_preferences',
|
||||
'$config' => '@config',
|
||||
],
|
||||
],
|
||||
Transformation\OverviewController::class => [
|
||||
@ -1339,7 +1392,12 @@ return [
|
||||
],
|
||||
UserPasswordController::class => [
|
||||
'class' => UserPasswordController::class,
|
||||
'arguments' => ['$response' => '@response', '$userPassword' => '@user_password', '$dbi' => '@dbi'],
|
||||
'arguments' => [
|
||||
'$response' => '@response',
|
||||
'$userPassword' => '@user_password',
|
||||
'$dbi' => '@dbi',
|
||||
'$config' => '@config',
|
||||
],
|
||||
],
|
||||
VersionCheckController::class => [
|
||||
'class' => VersionCheckController::class,
|
||||
@ -1363,10 +1421,7 @@ return [
|
||||
],
|
||||
SyncFavoriteTablesController::class => [
|
||||
'class' => SyncFavoriteTablesController::class,
|
||||
'arguments' => [
|
||||
'$response' => '@response',
|
||||
'$relation' => '@relation',
|
||||
],
|
||||
'arguments' => ['$response' => '@response', '$relation' => '@relation', '$config' => '@config'],
|
||||
],
|
||||
],
|
||||
];
|
||||
|
||||
@ -1782,33 +1782,6 @@ parameters:
|
||||
count: 1
|
||||
path: src/Console.php
|
||||
|
||||
-
|
||||
message: '''
|
||||
#^Call to deprecated method getInstance\(\) of class PhpMyAdmin\\Config\:
|
||||
Use dependency injection instead\.$#
|
||||
'''
|
||||
identifier: staticMethod.deprecated
|
||||
count: 1
|
||||
path: src/Controllers/CheckRelationsController.php
|
||||
|
||||
-
|
||||
message: '''
|
||||
#^Call to deprecated method getInstance\(\) of class PhpMyAdmin\\Config\:
|
||||
Use dependency injection instead\.$#
|
||||
'''
|
||||
identifier: staticMethod.deprecated
|
||||
count: 2
|
||||
path: src/Controllers/Console/Bookmark/AddController.php
|
||||
|
||||
-
|
||||
message: '''
|
||||
#^Call to deprecated method getInstance\(\) of class PhpMyAdmin\\Config\:
|
||||
Use dependency injection instead\.$#
|
||||
'''
|
||||
identifier: staticMethod.deprecated
|
||||
count: 1
|
||||
path: src/Controllers/Database/CentralColumnsController.php
|
||||
|
||||
-
|
||||
message: '#^Binary operation "\.\=" between mixed and '' \-\> '' results in an error\.$#'
|
||||
identifier: assignOp.invalid
|
||||
@ -1959,15 +1932,6 @@ parameters:
|
||||
count: 1
|
||||
path: src/Controllers/Database/EventsController.php
|
||||
|
||||
-
|
||||
message: '''
|
||||
#^Call to deprecated method getInstance\(\) of class PhpMyAdmin\\Config\:
|
||||
Use dependency injection instead\.$#
|
||||
'''
|
||||
identifier: staticMethod.deprecated
|
||||
count: 3
|
||||
path: src/Controllers/Database/ImportController.php
|
||||
|
||||
-
|
||||
message: '#^Cannot access offset ''handler'' on mixed\.$#'
|
||||
identifier: offsetAccess.nonOffsetAccessible
|
||||
@ -1986,30 +1950,12 @@ parameters:
|
||||
count: 1
|
||||
path: src/Controllers/Database/MultiTableQuery/QueryController.php
|
||||
|
||||
-
|
||||
message: '''
|
||||
#^Call to deprecated method getInstance\(\) of class PhpMyAdmin\\Config\:
|
||||
Use dependency injection instead\.$#
|
||||
'''
|
||||
identifier: staticMethod.deprecated
|
||||
count: 1
|
||||
path: src/Controllers/Database/PrivilegesController.php
|
||||
|
||||
-
|
||||
message: '#^Binary operation "\-" between mixed and 1 results in an error\.$#'
|
||||
identifier: binaryOp.invalid
|
||||
count: 6
|
||||
path: src/Controllers/Database/RoutinesController.php
|
||||
|
||||
-
|
||||
message: '''
|
||||
#^Call to deprecated method getInstance\(\) of class PhpMyAdmin\\Config\:
|
||||
Use dependency injection instead\.$#
|
||||
'''
|
||||
identifier: staticMethod.deprecated
|
||||
count: 1
|
||||
path: src/Controllers/Database/RoutinesController.php
|
||||
|
||||
-
|
||||
message: '#^Cannot access an offset on mixed\.$#'
|
||||
identifier: offsetAccess.nonOffsetAccessible
|
||||
@ -2112,15 +2058,6 @@ parameters:
|
||||
count: 1
|
||||
path: src/Controllers/Database/RoutinesController.php
|
||||
|
||||
-
|
||||
message: '''
|
||||
#^Call to deprecated method getInstance\(\) of class PhpMyAdmin\\Config\:
|
||||
Use dependency injection instead\.$#
|
||||
'''
|
||||
identifier: staticMethod.deprecated
|
||||
count: 1
|
||||
path: src/Controllers/Database/SearchController.php
|
||||
|
||||
-
|
||||
message: '#^Construct empty\(\) is not allowed\. Use more strict comparison\.$#'
|
||||
identifier: empty.notAllowed
|
||||
@ -2172,15 +2109,6 @@ parameters:
|
||||
count: 2
|
||||
path: src/Controllers/Database/Structure/DropTableController.php
|
||||
|
||||
-
|
||||
message: '''
|
||||
#^Call to deprecated method getInstance\(\) of class PhpMyAdmin\\Config\:
|
||||
Use dependency injection instead\.$#
|
||||
'''
|
||||
identifier: staticMethod.deprecated
|
||||
count: 1
|
||||
path: src/Controllers/Database/Structure/EmptyTableController.php
|
||||
|
||||
-
|
||||
message: '#^Construct empty\(\) is not allowed\. Use more strict comparison\.$#'
|
||||
identifier: empty.notAllowed
|
||||
@ -2193,15 +2121,6 @@ parameters:
|
||||
count: 1
|
||||
path: src/Controllers/Database/Structure/EmptyTableController.php
|
||||
|
||||
-
|
||||
message: '''
|
||||
#^Call to deprecated method getInstance\(\) of class PhpMyAdmin\\Config\:
|
||||
Use dependency injection instead\.$#
|
||||
'''
|
||||
identifier: staticMethod.deprecated
|
||||
count: 1
|
||||
path: src/Controllers/Database/Structure/FavoriteTableController.php
|
||||
|
||||
-
|
||||
message: '#^Loose comparison via "\=\=" is not allowed\.$#'
|
||||
identifier: equal.notAllowed
|
||||
@ -2250,15 +2169,6 @@ parameters:
|
||||
count: 1
|
||||
path: src/Controllers/Database/StructureController.php
|
||||
|
||||
-
|
||||
message: '''
|
||||
#^Call to deprecated method getInstance\(\) of class PhpMyAdmin\\Config\:
|
||||
Use dependency injection instead\.$#
|
||||
'''
|
||||
identifier: staticMethod.deprecated
|
||||
count: 5
|
||||
path: src/Controllers/Database/StructureController.php
|
||||
|
||||
-
|
||||
message: '#^Call to function array_search\(\) requires parameter \#3 to be set\.$#'
|
||||
identifier: function.strict
|
||||
@ -2385,15 +2295,6 @@ parameters:
|
||||
count: 1
|
||||
path: src/Controllers/Database/StructureController.php
|
||||
|
||||
-
|
||||
message: '''
|
||||
#^Call to deprecated method getInstance\(\) of class PhpMyAdmin\\Config\:
|
||||
Use dependency injection instead\.$#
|
||||
'''
|
||||
identifier: staticMethod.deprecated
|
||||
count: 1
|
||||
path: src/Controllers/Database/TrackingController.php
|
||||
|
||||
-
|
||||
message: '#^Parameter \#2 \$selected of method PhpMyAdmin\\Tracking\\Tracking\:\:createTrackingForMultipleTables\(\) expects array\<mixed\>, mixed given\.$#'
|
||||
identifier: argument.type
|
||||
@ -2412,15 +2313,6 @@ parameters:
|
||||
count: 1
|
||||
path: src/Controllers/ErrorReportController.php
|
||||
|
||||
-
|
||||
message: '''
|
||||
#^Call to deprecated method getInstance\(\) of class PhpMyAdmin\\Config\:
|
||||
Use dependency injection instead\.$#
|
||||
'''
|
||||
identifier: staticMethod.deprecated
|
||||
count: 1
|
||||
path: src/Controllers/ErrorReportController.php
|
||||
|
||||
-
|
||||
message: '#^Cannot access offset ''success'' on mixed\.$#'
|
||||
identifier: offsetAccess.nonOffsetAccessible
|
||||
@ -2439,15 +2331,6 @@ parameters:
|
||||
count: 1
|
||||
path: src/Controllers/ErrorReportController.php
|
||||
|
||||
-
|
||||
message: '''
|
||||
#^Call to deprecated method getInstance\(\) of class PhpMyAdmin\\Config\:
|
||||
Use dependency injection instead\.$#
|
||||
'''
|
||||
identifier: staticMethod.deprecated
|
||||
count: 1
|
||||
path: src/Controllers/Export/ExportController.php
|
||||
|
||||
-
|
||||
message: '#^Cannot access offset ''aliases'' on mixed\.$#'
|
||||
identifier: offsetAccess.nonOffsetAccessible
|
||||
@ -2520,42 +2403,6 @@ parameters:
|
||||
count: 1
|
||||
path: src/Controllers/Export/ExportController.php
|
||||
|
||||
-
|
||||
message: '''
|
||||
#^Call to deprecated method getInstance\(\) of class PhpMyAdmin\\Config\:
|
||||
Use dependency injection instead\.$#
|
||||
'''
|
||||
identifier: staticMethod.deprecated
|
||||
count: 1
|
||||
path: src/Controllers/Export/Template/CreateController.php
|
||||
|
||||
-
|
||||
message: '''
|
||||
#^Call to deprecated method getInstance\(\) of class PhpMyAdmin\\Config\:
|
||||
Use dependency injection instead\.$#
|
||||
'''
|
||||
identifier: staticMethod.deprecated
|
||||
count: 1
|
||||
path: src/Controllers/Export/Template/DeleteController.php
|
||||
|
||||
-
|
||||
message: '''
|
||||
#^Call to deprecated method getInstance\(\) of class PhpMyAdmin\\Config\:
|
||||
Use dependency injection instead\.$#
|
||||
'''
|
||||
identifier: staticMethod.deprecated
|
||||
count: 1
|
||||
path: src/Controllers/Export/Template/LoadController.php
|
||||
|
||||
-
|
||||
message: '''
|
||||
#^Call to deprecated method getInstance\(\) of class PhpMyAdmin\\Config\:
|
||||
Use dependency injection instead\.$#
|
||||
'''
|
||||
identifier: staticMethod.deprecated
|
||||
count: 1
|
||||
path: src/Controllers/Export/Template/UpdateController.php
|
||||
|
||||
-
|
||||
message: '#^Cannot cast mixed to int\.$#'
|
||||
identifier: cast.int
|
||||
@ -2568,15 +2415,6 @@ parameters:
|
||||
count: 1
|
||||
path: src/Controllers/GisDataEditorController.php
|
||||
|
||||
-
|
||||
message: '''
|
||||
#^Call to deprecated method getInstance\(\) of class PhpMyAdmin\\Config\:
|
||||
Use dependency injection instead\.$#
|
||||
'''
|
||||
identifier: staticMethod.deprecated
|
||||
count: 3
|
||||
path: src/Controllers/HomeController.php
|
||||
|
||||
-
|
||||
message: '#^Construct empty\(\) is not allowed\. Use more strict comparison\.$#'
|
||||
identifier: empty.notAllowed
|
||||
@ -2607,15 +2445,6 @@ parameters:
|
||||
count: 1
|
||||
path: src/Controllers/HomeController.php
|
||||
|
||||
-
|
||||
message: '''
|
||||
#^Call to deprecated method getInstance\(\) of class PhpMyAdmin\\Config\:
|
||||
Use dependency injection instead\.$#
|
||||
'''
|
||||
identifier: staticMethod.deprecated
|
||||
count: 1
|
||||
path: src/Controllers/Import/ImportController.php
|
||||
|
||||
-
|
||||
message: '#^Cannot access offset ''go_back_url'' on mixed\.$#'
|
||||
identifier: offsetAccess.nonOffsetAccessible
|
||||
@ -2808,15 +2637,6 @@ parameters:
|
||||
count: 1
|
||||
path: src/Controllers/Normalization/ThirdNormalForm/NewTablesController.php
|
||||
|
||||
-
|
||||
message: '''
|
||||
#^Call to deprecated method getInstance\(\) of class PhpMyAdmin\\Config\:
|
||||
Use dependency injection instead\.$#
|
||||
'''
|
||||
identifier: staticMethod.deprecated
|
||||
count: 1
|
||||
path: src/Controllers/Operations/DatabaseController.php
|
||||
|
||||
-
|
||||
message: '#^Construct empty\(\) is not allowed\. Use more strict comparison\.$#'
|
||||
identifier: empty.notAllowed
|
||||
@ -2841,15 +2661,6 @@ parameters:
|
||||
count: 1
|
||||
path: src/Controllers/Operations/DatabaseController.php
|
||||
|
||||
-
|
||||
message: '''
|
||||
#^Call to deprecated method getInstance\(\) of class PhpMyAdmin\\Config\:
|
||||
Use dependency injection instead\.$#
|
||||
'''
|
||||
identifier: staticMethod.deprecated
|
||||
count: 1
|
||||
path: src/Controllers/Operations/TableController.php
|
||||
|
||||
-
|
||||
message: '#^Construct empty\(\) is not allowed\. Use more strict comparison\.$#'
|
||||
identifier: empty.notAllowed
|
||||
@ -2880,42 +2691,6 @@ parameters:
|
||||
count: 1
|
||||
path: src/Controllers/Operations/TableController.php
|
||||
|
||||
-
|
||||
message: '''
|
||||
#^Call to deprecated method getInstance\(\) of class PhpMyAdmin\\Config\:
|
||||
Use dependency injection instead\.$#
|
||||
'''
|
||||
identifier: staticMethod.deprecated
|
||||
count: 1
|
||||
path: src/Controllers/Preferences/ExportController.php
|
||||
|
||||
-
|
||||
message: '''
|
||||
#^Call to deprecated method getInstance\(\) of class PhpMyAdmin\\Config\:
|
||||
Use dependency injection instead\.$#
|
||||
'''
|
||||
identifier: staticMethod.deprecated
|
||||
count: 1
|
||||
path: src/Controllers/Preferences/FeaturesController.php
|
||||
|
||||
-
|
||||
message: '''
|
||||
#^Call to deprecated method getInstance\(\) of class PhpMyAdmin\\Config\:
|
||||
Use dependency injection instead\.$#
|
||||
'''
|
||||
identifier: staticMethod.deprecated
|
||||
count: 1
|
||||
path: src/Controllers/Preferences/ImportController.php
|
||||
|
||||
-
|
||||
message: '''
|
||||
#^Call to deprecated method getInstance\(\) of class PhpMyAdmin\\Config\:
|
||||
Use dependency injection instead\.$#
|
||||
'''
|
||||
identifier: staticMethod.deprecated
|
||||
count: 1
|
||||
path: src/Controllers/Preferences/MainPanelController.php
|
||||
|
||||
-
|
||||
message: '#^Loose comparison via "\!\=" is not allowed\.$#'
|
||||
identifier: notEqual.notAllowed
|
||||
@ -2970,84 +2745,12 @@ parameters:
|
||||
count: 1
|
||||
path: src/Controllers/Preferences/ManageController.php
|
||||
|
||||
-
|
||||
message: '''
|
||||
#^Call to deprecated method getInstance\(\) of class PhpMyAdmin\\Config\:
|
||||
Use dependency injection instead\.$#
|
||||
'''
|
||||
identifier: staticMethod.deprecated
|
||||
count: 1
|
||||
path: src/Controllers/Preferences/NavigationController.php
|
||||
|
||||
-
|
||||
message: '''
|
||||
#^Call to deprecated method getInstance\(\) of class PhpMyAdmin\\Config\:
|
||||
Use dependency injection instead\.$#
|
||||
'''
|
||||
identifier: staticMethod.deprecated
|
||||
count: 1
|
||||
path: src/Controllers/Preferences/SqlController.php
|
||||
|
||||
-
|
||||
message: '''
|
||||
#^Call to deprecated method getInstance\(\) of class PhpMyAdmin\\Config\:
|
||||
Use dependency injection instead\.$#
|
||||
'''
|
||||
identifier: staticMethod.deprecated
|
||||
count: 1
|
||||
path: src/Controllers/Preferences/TwoFactorController.php
|
||||
|
||||
-
|
||||
message: '''
|
||||
#^Call to deprecated method getInstance\(\) of class PhpMyAdmin\\Config\:
|
||||
Use dependency injection instead\.$#
|
||||
'''
|
||||
identifier: staticMethod.deprecated
|
||||
count: 1
|
||||
path: src/Controllers/Server/BinlogController.php
|
||||
|
||||
-
|
||||
message: '''
|
||||
#^Call to deprecated method getInstance\(\) of class PhpMyAdmin\\Config\:
|
||||
Use dependency injection instead\.$#
|
||||
'''
|
||||
identifier: staticMethod.deprecated
|
||||
count: 1
|
||||
path: src/Controllers/Server/CollationsController.php
|
||||
|
||||
-
|
||||
message: '''
|
||||
#^Call to deprecated method getInstance\(\) of class PhpMyAdmin\\Config\:
|
||||
Use dependency injection instead\.$#
|
||||
'''
|
||||
identifier: staticMethod.deprecated
|
||||
count: 1
|
||||
path: src/Controllers/Server/Databases/CreateController.php
|
||||
|
||||
-
|
||||
message: '#^Only booleans are allowed in a negated boolean, PhpMyAdmin\\Dbal\\ResultInterface\|false given\.$#'
|
||||
identifier: booleanNot.exprNotBoolean
|
||||
count: 1
|
||||
path: src/Controllers/Server/Databases/CreateController.php
|
||||
|
||||
-
|
||||
message: '''
|
||||
#^Call to deprecated method getInstance\(\) of class PhpMyAdmin\\Config\:
|
||||
Use dependency injection instead\.$#
|
||||
'''
|
||||
identifier: staticMethod.deprecated
|
||||
count: 1
|
||||
path: src/Controllers/Server/Databases/DestroyController.php
|
||||
|
||||
-
|
||||
message: '''
|
||||
#^Call to deprecated method getInstance\(\) of class PhpMyAdmin\\Config\:
|
||||
Use dependency injection instead\.$#
|
||||
'''
|
||||
identifier: staticMethod.deprecated
|
||||
count: 2
|
||||
path: src/Controllers/Server/DatabasesController.php
|
||||
|
||||
-
|
||||
message: '#^Call to function array_search\(\) requires parameter \#3 to be set\.$#'
|
||||
identifier: function.strict
|
||||
@ -3120,15 +2823,6 @@ parameters:
|
||||
count: 1
|
||||
path: src/Controllers/Server/DatabasesController.php
|
||||
|
||||
-
|
||||
message: '''
|
||||
#^Call to deprecated method getInstance\(\) of class PhpMyAdmin\\Config\:
|
||||
Use dependency injection instead\.$#
|
||||
'''
|
||||
identifier: staticMethod.deprecated
|
||||
count: 3
|
||||
path: src/Controllers/Server/ImportController.php
|
||||
|
||||
-
|
||||
message: '#^Cannot access offset ''handler'' on mixed\.$#'
|
||||
identifier: offsetAccess.nonOffsetAccessible
|
||||
@ -3399,15 +3093,6 @@ parameters:
|
||||
count: 1
|
||||
path: src/Controllers/Sql/RelationalValuesController.php
|
||||
|
||||
-
|
||||
message: '''
|
||||
#^Call to deprecated method getInstance\(\) of class PhpMyAdmin\\Config\:
|
||||
Use dependency injection instead\.$#
|
||||
'''
|
||||
identifier: staticMethod.deprecated
|
||||
count: 1
|
||||
path: src/Controllers/Sql/SqlController.php
|
||||
|
||||
-
|
||||
message: '#^Loose comparison via "\!\=" is not allowed\.$#'
|
||||
identifier: notEqual.notAllowed
|
||||
@ -3426,15 +3111,6 @@ parameters:
|
||||
count: 1
|
||||
path: src/Controllers/Sql/SqlController.php
|
||||
|
||||
-
|
||||
message: '''
|
||||
#^Call to deprecated method getInstance\(\) of class PhpMyAdmin\\Config\:
|
||||
Use dependency injection instead\.$#
|
||||
'''
|
||||
identifier: staticMethod.deprecated
|
||||
count: 1
|
||||
path: src/Controllers/SyncFavoriteTablesController.php
|
||||
|
||||
-
|
||||
message: '#^Cannot access offset ''db'' on mixed\.$#'
|
||||
identifier: offsetAccess.nonOffsetAccessible
|
||||
@ -3555,15 +3231,6 @@ parameters:
|
||||
count: 1
|
||||
path: src/Controllers/Table/ChartController.php
|
||||
|
||||
-
|
||||
message: '''
|
||||
#^Call to deprecated method getInstance\(\) of class PhpMyAdmin\\Config\:
|
||||
Use dependency injection instead\.$#
|
||||
'''
|
||||
identifier: staticMethod.deprecated
|
||||
count: 1
|
||||
path: src/Controllers/Table/ChartController.php
|
||||
|
||||
-
|
||||
message: '#^Construct empty\(\) is not allowed\. Use more strict comparison\.$#'
|
||||
identifier: empty.notAllowed
|
||||
@ -3636,15 +3303,6 @@ parameters:
|
||||
count: 1
|
||||
path: src/Controllers/Table/DeleteRowsController.php
|
||||
|
||||
-
|
||||
message: '''
|
||||
#^Call to deprecated method getInstance\(\) of class PhpMyAdmin\\Config\:
|
||||
Use dependency injection instead\.$#
|
||||
'''
|
||||
identifier: staticMethod.deprecated
|
||||
count: 1
|
||||
path: src/Controllers/Table/DeleteRowsController.php
|
||||
|
||||
-
|
||||
message: '#^Construct empty\(\) is not allowed\. Use more strict comparison\.$#'
|
||||
identifier: empty.notAllowed
|
||||
@ -3717,15 +3375,6 @@ parameters:
|
||||
count: 1
|
||||
path: src/Controllers/Table/ExportRowsController.php
|
||||
|
||||
-
|
||||
message: '''
|
||||
#^Call to deprecated method getInstance\(\) of class PhpMyAdmin\\Config\:
|
||||
Use dependency injection instead\.$#
|
||||
'''
|
||||
identifier: staticMethod.deprecated
|
||||
count: 1
|
||||
path: src/Controllers/Table/FindReplaceController.php
|
||||
|
||||
-
|
||||
message: '#^Cannot access offset 0 on mixed\.$#'
|
||||
identifier: offsetAccess.nonOffsetAccessible
|
||||
@ -3768,15 +3417,6 @@ parameters:
|
||||
count: 3
|
||||
path: src/Controllers/Table/GetFieldController.php
|
||||
|
||||
-
|
||||
message: '''
|
||||
#^Call to deprecated method getInstance\(\) of class PhpMyAdmin\\Config\:
|
||||
Use dependency injection instead\.$#
|
||||
'''
|
||||
identifier: staticMethod.deprecated
|
||||
count: 2
|
||||
path: src/Controllers/Table/GisVisualizationController.php
|
||||
|
||||
-
|
||||
message: '#^Cannot access offset ''max_rows'' on mixed\.$#'
|
||||
identifier: offsetAccess.nonOffsetAccessible
|
||||
@ -3801,15 +3441,6 @@ parameters:
|
||||
count: 1
|
||||
path: src/Controllers/Table/GisVisualizationController.php
|
||||
|
||||
-
|
||||
message: '''
|
||||
#^Call to deprecated method getInstance\(\) of class PhpMyAdmin\\Config\:
|
||||
Use dependency injection instead\.$#
|
||||
'''
|
||||
identifier: staticMethod.deprecated
|
||||
count: 3
|
||||
path: src/Controllers/Table/ImportController.php
|
||||
|
||||
-
|
||||
message: '#^Cannot access offset ''handler'' on mixed\.$#'
|
||||
identifier: offsetAccess.nonOffsetAccessible
|
||||
@ -3828,15 +3459,6 @@ parameters:
|
||||
count: 1
|
||||
path: src/Controllers/Table/IndexesController.php
|
||||
|
||||
-
|
||||
message: '''
|
||||
#^Call to deprecated method getInstance\(\) of class PhpMyAdmin\\Config\:
|
||||
Use dependency injection instead\.$#
|
||||
'''
|
||||
identifier: staticMethod.deprecated
|
||||
count: 1
|
||||
path: src/Controllers/Table/IndexesController.php
|
||||
|
||||
-
|
||||
message: '#^Cannot access offset ''Index_choice'' on mixed\.$#'
|
||||
identifier: offsetAccess.nonOffsetAccessible
|
||||
@ -3873,24 +3495,6 @@ parameters:
|
||||
count: 2
|
||||
path: src/Controllers/Table/IndexesController.php
|
||||
|
||||
-
|
||||
message: '''
|
||||
#^Call to deprecated method getInstance\(\) of class PhpMyAdmin\\Config\:
|
||||
Use dependency injection instead\.$#
|
||||
'''
|
||||
identifier: staticMethod.deprecated
|
||||
count: 1
|
||||
path: src/Controllers/Table/PrivilegesController.php
|
||||
|
||||
-
|
||||
message: '''
|
||||
#^Call to deprecated method getInstance\(\) of class PhpMyAdmin\\Config\:
|
||||
Use dependency injection instead\.$#
|
||||
'''
|
||||
identifier: staticMethod.deprecated
|
||||
count: 3
|
||||
path: src/Controllers/Table/RelationController.php
|
||||
|
||||
-
|
||||
message: '#^Parameter \#1 \$dbName of method PhpMyAdmin\\Dbal\\DatabaseInterface\:\:getTable\(\) expects string, mixed given\.$#'
|
||||
identifier: argument.type
|
||||
@ -4143,15 +3747,6 @@ parameters:
|
||||
count: 1
|
||||
path: src/Controllers/Table/ReplaceController.php
|
||||
|
||||
-
|
||||
message: '''
|
||||
#^Call to deprecated method getInstance\(\) of class PhpMyAdmin\\Config\:
|
||||
Use dependency injection instead\.$#
|
||||
'''
|
||||
identifier: staticMethod.deprecated
|
||||
count: 3
|
||||
path: src/Controllers/Table/SearchController.php
|
||||
|
||||
-
|
||||
message: '#^Cannot access offset int on mixed\.$#'
|
||||
identifier: offsetAccess.nonOffsetAccessible
|
||||
@ -4308,15 +3903,6 @@ parameters:
|
||||
count: 1
|
||||
path: src/Controllers/Table/Structure/ReservedWordCheckController.php
|
||||
|
||||
-
|
||||
message: '''
|
||||
#^Call to deprecated method getInstance\(\) of class PhpMyAdmin\\Config\:
|
||||
Use dependency injection instead\.$#
|
||||
'''
|
||||
identifier: staticMethod.deprecated
|
||||
count: 1
|
||||
path: src/Controllers/Table/Structure/ReservedWordCheckController.php
|
||||
|
||||
-
|
||||
message: '#^Only booleans are allowed in a negated boolean, int\|null given\.$#'
|
||||
identifier: booleanNot.exprNotBoolean
|
||||
@ -4347,15 +3933,6 @@ parameters:
|
||||
count: 1
|
||||
path: src/Controllers/Table/Structure/SaveController.php
|
||||
|
||||
-
|
||||
message: '''
|
||||
#^Call to deprecated method getInstance\(\) of class PhpMyAdmin\\Config\:
|
||||
Use dependency injection instead\.$#
|
||||
'''
|
||||
identifier: staticMethod.deprecated
|
||||
count: 1
|
||||
path: src/Controllers/Table/Structure/SaveController.php
|
||||
|
||||
-
|
||||
message: '#^Call to function in_array\(\) requires parameter \#3 to be set\.$#'
|
||||
identifier: function.strict
|
||||
@ -4578,15 +4155,6 @@ parameters:
|
||||
count: 1
|
||||
path: src/Controllers/Table/StructureController.php
|
||||
|
||||
-
|
||||
message: '''
|
||||
#^Call to deprecated method getInstance\(\) of class PhpMyAdmin\\Config\:
|
||||
Use dependency injection instead\.$#
|
||||
'''
|
||||
identifier: staticMethod.deprecated
|
||||
count: 2
|
||||
path: src/Controllers/Table/StructureController.php
|
||||
|
||||
-
|
||||
message: '#^Call to function in_array\(\) requires parameter \#3 to be set\.$#'
|
||||
identifier: function.strict
|
||||
@ -4641,15 +4209,6 @@ parameters:
|
||||
count: 1
|
||||
path: src/Controllers/Table/ZoomSearchController.php
|
||||
|
||||
-
|
||||
message: '''
|
||||
#^Call to deprecated method getInstance\(\) of class PhpMyAdmin\\Config\:
|
||||
Use dependency injection instead\.$#
|
||||
'''
|
||||
identifier: staticMethod.deprecated
|
||||
count: 4
|
||||
path: src/Controllers/Table/ZoomSearchController.php
|
||||
|
||||
-
|
||||
message: '#^Call to function array_search\(\) requires parameter \#3 to be set\.$#'
|
||||
identifier: function.strict
|
||||
@ -4782,15 +4341,6 @@ parameters:
|
||||
count: 1
|
||||
path: src/Controllers/Table/ZoomSearchController.php
|
||||
|
||||
-
|
||||
message: '''
|
||||
#^Call to deprecated method getInstance\(\) of class PhpMyAdmin\\Config\:
|
||||
Use dependency injection instead\.$#
|
||||
'''
|
||||
identifier: staticMethod.deprecated
|
||||
count: 1
|
||||
path: src/Controllers/ThemeSetController.php
|
||||
|
||||
-
|
||||
message: '#^Construct empty\(\) is not allowed\. Use more strict comparison\.$#'
|
||||
identifier: empty.notAllowed
|
||||
@ -4827,15 +4377,6 @@ parameters:
|
||||
count: 2
|
||||
path: src/Controllers/Triggers/IndexController.php
|
||||
|
||||
-
|
||||
message: '''
|
||||
#^Call to deprecated method getInstance\(\) of class PhpMyAdmin\\Config\:
|
||||
Use dependency injection instead\.$#
|
||||
'''
|
||||
identifier: staticMethod.deprecated
|
||||
count: 1
|
||||
path: src/Controllers/UserPasswordController.php
|
||||
|
||||
-
|
||||
message: '#^Loose comparison via "\!\=" is not allowed\.$#'
|
||||
identifier: notEqual.notAllowed
|
||||
@ -17319,7 +16860,7 @@ parameters:
|
||||
Use dependency injection instead\.$#
|
||||
'''
|
||||
identifier: staticMethod.deprecated
|
||||
count: 3
|
||||
count: 6
|
||||
path: tests/unit/Controllers/Database/StructureControllerTest.php
|
||||
|
||||
-
|
||||
@ -17436,7 +16977,7 @@ parameters:
|
||||
Use dependency injection instead\.$#
|
||||
'''
|
||||
identifier: staticMethod.deprecated
|
||||
count: 2
|
||||
count: 1
|
||||
path: tests/unit/Controllers/Import/ImportControllerTest.php
|
||||
|
||||
-
|
||||
@ -17502,7 +17043,7 @@ parameters:
|
||||
Use dependency injection instead\.$#
|
||||
'''
|
||||
identifier: staticMethod.deprecated
|
||||
count: 1
|
||||
count: 2
|
||||
path: tests/unit/Controllers/Server/BinlogControllerTest.php
|
||||
|
||||
-
|
||||
@ -17520,7 +17061,7 @@ parameters:
|
||||
Use dependency injection instead\.$#
|
||||
'''
|
||||
identifier: staticMethod.deprecated
|
||||
count: 1
|
||||
count: 2
|
||||
path: tests/unit/Controllers/Server/CollationsControllerTest.php
|
||||
|
||||
-
|
||||
@ -18018,7 +17559,7 @@ parameters:
|
||||
Use dependency injection instead\.$#
|
||||
'''
|
||||
identifier: staticMethod.deprecated
|
||||
count: 1
|
||||
count: 2
|
||||
path: tests/unit/Controllers/Table/IndexesControllerTest.php
|
||||
|
||||
-
|
||||
@ -18045,7 +17586,7 @@ parameters:
|
||||
Use dependency injection instead\.$#
|
||||
'''
|
||||
identifier: staticMethod.deprecated
|
||||
count: 1
|
||||
count: 5
|
||||
path: tests/unit/Controllers/Table/RelationControllerTest.php
|
||||
|
||||
-
|
||||
@ -18054,7 +17595,7 @@ parameters:
|
||||
Use dependency injection instead\.$#
|
||||
'''
|
||||
identifier: staticMethod.deprecated
|
||||
count: 3
|
||||
count: 2
|
||||
path: tests/unit/Controllers/Table/ReplaceControllerTest.php
|
||||
|
||||
-
|
||||
|
||||
@ -720,11 +720,6 @@
|
||||
<code><![CDATA[Response]]></code>
|
||||
</PossiblyUnusedReturnValue>
|
||||
</file>
|
||||
<file src="src/Controllers/CheckRelationsController.php">
|
||||
<DeprecatedMethod>
|
||||
<code><![CDATA[Config::getInstance()]]></code>
|
||||
</DeprecatedMethod>
|
||||
</file>
|
||||
<file src="src/Controllers/CollationConnectionController.php">
|
||||
<PossiblyUnusedReturnValue>
|
||||
<code><![CDATA[Response]]></code>
|
||||
@ -736,10 +731,6 @@
|
||||
</PossiblyUnusedReturnValue>
|
||||
</file>
|
||||
<file src="src/Controllers/Console/Bookmark/AddController.php">
|
||||
<DeprecatedMethod>
|
||||
<code><![CDATA[Config::getInstance()]]></code>
|
||||
<code><![CDATA[Config::getInstance()]]></code>
|
||||
</DeprecatedMethod>
|
||||
<PossiblyUnusedReturnValue>
|
||||
<code><![CDATA[Response]]></code>
|
||||
</PossiblyUnusedReturnValue>
|
||||
@ -755,9 +746,6 @@
|
||||
</PossiblyUnusedMethod>
|
||||
</file>
|
||||
<file src="src/Controllers/Database/CentralColumnsController.php">
|
||||
<DeprecatedMethod>
|
||||
<code><![CDATA[Config::getInstance()]]></code>
|
||||
</DeprecatedMethod>
|
||||
<PossiblyUnusedMethod>
|
||||
<code><![CDATA[__construct]]></code>
|
||||
</PossiblyUnusedMethod>
|
||||
@ -876,11 +864,6 @@
|
||||
</PossiblyUnusedMethod>
|
||||
</file>
|
||||
<file src="src/Controllers/Database/ImportController.php">
|
||||
<DeprecatedMethod>
|
||||
<code><![CDATA[Config::getInstance()]]></code>
|
||||
<code><![CDATA[Config::getInstance()]]></code>
|
||||
<code><![CDATA[Config::getInstance()]]></code>
|
||||
</DeprecatedMethod>
|
||||
<MixedArrayAccess>
|
||||
<code><![CDATA[$_SESSION[Ajax::SESSION_KEY]['handler']]]></code>
|
||||
<code><![CDATA[$_SESSION[Ajax::SESSION_KEY]['handler']]]></code>
|
||||
@ -914,17 +897,11 @@
|
||||
</PossiblyUnusedMethod>
|
||||
</file>
|
||||
<file src="src/Controllers/Database/PrivilegesController.php">
|
||||
<DeprecatedMethod>
|
||||
<code><![CDATA[Config::getInstance()]]></code>
|
||||
</DeprecatedMethod>
|
||||
<PossiblyUnusedReturnValue>
|
||||
<code><![CDATA[Response]]></code>
|
||||
</PossiblyUnusedReturnValue>
|
||||
</file>
|
||||
<file src="src/Controllers/Database/RoutinesController.php">
|
||||
<DeprecatedMethod>
|
||||
<code><![CDATA[Config::getInstance()]]></code>
|
||||
</DeprecatedMethod>
|
||||
<MixedArgument>
|
||||
<code><![CDATA[$routine['item_param_length'][$i]]]></code>
|
||||
<code><![CDATA[$routine['item_param_name'][$i]]]></code>
|
||||
@ -1045,9 +1022,6 @@
|
||||
</RiskyTruthyFalsyComparison>
|
||||
</file>
|
||||
<file src="src/Controllers/Database/SearchController.php">
|
||||
<DeprecatedMethod>
|
||||
<code><![CDATA[Config::getInstance()]]></code>
|
||||
</DeprecatedMethod>
|
||||
<MixedArgument>
|
||||
<code><![CDATA[Current::$database]]></code>
|
||||
</MixedArgument>
|
||||
@ -1140,9 +1114,6 @@
|
||||
</PossiblyUnusedMethod>
|
||||
</file>
|
||||
<file src="src/Controllers/Database/Structure/EmptyTableController.php">
|
||||
<DeprecatedMethod>
|
||||
<code><![CDATA[Config::getInstance()]]></code>
|
||||
</DeprecatedMethod>
|
||||
<InvalidArgument>
|
||||
<code><![CDATA[$_REQUEST['pos']]]></code>
|
||||
</InvalidArgument>
|
||||
@ -1154,9 +1125,6 @@
|
||||
</RiskyTruthyFalsyComparison>
|
||||
</file>
|
||||
<file src="src/Controllers/Database/Structure/FavoriteTableController.php">
|
||||
<DeprecatedMethod>
|
||||
<code><![CDATA[Config::getInstance()]]></code>
|
||||
</DeprecatedMethod>
|
||||
<MixedAssignment>
|
||||
<code><![CDATA[$favoriteTables]]></code>
|
||||
</MixedAssignment>
|
||||
@ -1190,13 +1158,6 @@
|
||||
</PossiblyUnusedMethod>
|
||||
</file>
|
||||
<file src="src/Controllers/Database/StructureController.php">
|
||||
<DeprecatedMethod>
|
||||
<code><![CDATA[Config::getInstance()]]></code>
|
||||
<code><![CDATA[Config::getInstance()]]></code>
|
||||
<code><![CDATA[Config::getInstance()]]></code>
|
||||
<code><![CDATA[Config::getInstance()]]></code>
|
||||
<code><![CDATA[Config::getInstance()]]></code>
|
||||
</DeprecatedMethod>
|
||||
<MixedArgument>
|
||||
<code><![CDATA[$currentTable['Collation']]]></code>
|
||||
<code><![CDATA[$currentTable['Data_free']]]></code>
|
||||
@ -1285,9 +1246,6 @@
|
||||
</PossiblyUndefinedArrayOffset>
|
||||
</file>
|
||||
<file src="src/Controllers/Database/TrackingController.php">
|
||||
<DeprecatedMethod>
|
||||
<code><![CDATA[Config::getInstance()]]></code>
|
||||
</DeprecatedMethod>
|
||||
<MixedArgument>
|
||||
<code><![CDATA[$request->getParsedBodyParam('selected')]]></code>
|
||||
<code><![CDATA[Current::$database]]></code>
|
||||
@ -1302,9 +1260,6 @@
|
||||
</PossiblyUnusedReturnValue>
|
||||
</file>
|
||||
<file src="src/Controllers/ErrorReportController.php">
|
||||
<DeprecatedMethod>
|
||||
<code><![CDATA[Config::getInstance()]]></code>
|
||||
</DeprecatedMethod>
|
||||
<MixedArrayAccess>
|
||||
<code><![CDATA[$decodedResponse['success']]]></code>
|
||||
</MixedArrayAccess>
|
||||
@ -1326,9 +1281,6 @@
|
||||
</PossiblyUnusedMethod>
|
||||
</file>
|
||||
<file src="src/Controllers/Export/ExportController.php">
|
||||
<DeprecatedMethod>
|
||||
<code><![CDATA[Config::getInstance()]]></code>
|
||||
</DeprecatedMethod>
|
||||
<MixedArgument>
|
||||
<code><![CDATA[$dbSelect]]></code>
|
||||
</MixedArgument>
|
||||
@ -1379,7 +1331,7 @@
|
||||
<code><![CDATA[$asSeparateFiles]]></code>
|
||||
<code><![CDATA[$onServerParam]]></code>
|
||||
<code><![CDATA[$quickExportOnServer]]></code>
|
||||
<code><![CDATA[empty($config->settings['MemoryLimit'])]]></code>
|
||||
<code><![CDATA[empty($this->config->settings['MemoryLimit'])]]></code>
|
||||
</RiskyTruthyFalsyComparison>
|
||||
</file>
|
||||
<file src="src/Controllers/Export/TablesController.php">
|
||||
@ -1388,33 +1340,21 @@
|
||||
</PossiblyUnusedMethod>
|
||||
</file>
|
||||
<file src="src/Controllers/Export/Template/CreateController.php">
|
||||
<DeprecatedMethod>
|
||||
<code><![CDATA[Config::getInstance()]]></code>
|
||||
</DeprecatedMethod>
|
||||
<PossiblyUnusedReturnValue>
|
||||
<code><![CDATA[Response]]></code>
|
||||
</PossiblyUnusedReturnValue>
|
||||
</file>
|
||||
<file src="src/Controllers/Export/Template/DeleteController.php">
|
||||
<DeprecatedMethod>
|
||||
<code><![CDATA[Config::getInstance()]]></code>
|
||||
</DeprecatedMethod>
|
||||
<PossiblyUnusedReturnValue>
|
||||
<code><![CDATA[Response]]></code>
|
||||
</PossiblyUnusedReturnValue>
|
||||
</file>
|
||||
<file src="src/Controllers/Export/Template/LoadController.php">
|
||||
<DeprecatedMethod>
|
||||
<code><![CDATA[Config::getInstance()]]></code>
|
||||
</DeprecatedMethod>
|
||||
<PossiblyUnusedReturnValue>
|
||||
<code><![CDATA[Response]]></code>
|
||||
</PossiblyUnusedReturnValue>
|
||||
</file>
|
||||
<file src="src/Controllers/Export/Template/UpdateController.php">
|
||||
<DeprecatedMethod>
|
||||
<code><![CDATA[Config::getInstance()]]></code>
|
||||
</DeprecatedMethod>
|
||||
<PossiblyUnusedReturnValue>
|
||||
<code><![CDATA[Response]]></code>
|
||||
</PossiblyUnusedReturnValue>
|
||||
@ -1425,28 +1365,23 @@
|
||||
</PossiblyUnusedMethod>
|
||||
</file>
|
||||
<file src="src/Controllers/HomeController.php">
|
||||
<DeprecatedMethod>
|
||||
<code><![CDATA[Config::getInstance()]]></code>
|
||||
<code><![CDATA[Config::getInstance()]]></code>
|
||||
<code><![CDATA[Config::getInstance()]]></code>
|
||||
</DeprecatedMethod>
|
||||
<MixedArrayAccess>
|
||||
<code><![CDATA[$languageStats[Current::$lang]]]></code>
|
||||
</MixedArrayAccess>
|
||||
<MixedArrayOffset>
|
||||
<code><![CDATA[$config->settings['Servers'][Current::$server]]]></code>
|
||||
<code><![CDATA[$this->config->settings['Servers'][Current::$server]]]></code>
|
||||
</MixedArrayOffset>
|
||||
<MixedArrayTypeCoercion>
|
||||
<code><![CDATA[$config->settings['Servers'][Current::$server]]]></code>
|
||||
<code><![CDATA[$this->config->settings['Servers'][Current::$server]]]></code>
|
||||
</MixedArrayTypeCoercion>
|
||||
<MixedAssignment>
|
||||
<code><![CDATA[$languageStats]]></code>
|
||||
</MixedAssignment>
|
||||
<RiskyTruthyFalsyComparison>
|
||||
<code><![CDATA[empty($_REQUEST['access_time'])]]></code>
|
||||
<code><![CDATA[empty($config->selectedServer['verbose'])]]></code>
|
||||
<code><![CDATA[empty($config->selectedServer['verbose'])]]></code>
|
||||
<code><![CDATA[empty($config->settings['Servers'][Current::$server]['pmadb'])]]></code>
|
||||
<code><![CDATA[empty($this->config->selectedServer['verbose'])]]></code>
|
||||
<code><![CDATA[empty($this->config->selectedServer['verbose'])]]></code>
|
||||
<code><![CDATA[empty($this->config->settings['Servers'][Current::$server]['pmadb'])]]></code>
|
||||
<code><![CDATA[ini_get('allow_url_fopen')]]></code>
|
||||
<code><![CDATA[ini_get('suhosin.request.max_value_length')]]></code>
|
||||
</RiskyTruthyFalsyComparison>
|
||||
@ -1458,9 +1393,6 @@
|
||||
<ArgumentTypeCoercion>
|
||||
<code><![CDATA[$memoryLimit]]></code>
|
||||
</ArgumentTypeCoercion>
|
||||
<DeprecatedMethod>
|
||||
<code><![CDATA[Config::getInstance()]]></code>
|
||||
</DeprecatedMethod>
|
||||
<MixedArgumentTypeCoercion>
|
||||
<code><![CDATA[UrlParams::$params]]></code>
|
||||
</MixedArgumentTypeCoercion>
|
||||
@ -1488,7 +1420,7 @@
|
||||
<code><![CDATA[$request->getParsedBodyParamAsString('import_type', '')]]></code>
|
||||
</PropertyTypeCoercion>
|
||||
<RiskyTruthyFalsyComparison>
|
||||
<code><![CDATA[empty($config->settings['MemoryLimit'])]]></code>
|
||||
<code><![CDATA[empty($this->config->settings['MemoryLimit'])]]></code>
|
||||
</RiskyTruthyFalsyComparison>
|
||||
<UnusedProperty>
|
||||
<code><![CDATA[$sql]]></code>
|
||||
@ -1663,9 +1595,6 @@
|
||||
<ArgumentTypeCoercion>
|
||||
<code><![CDATA[$exportSqlPlugin]]></code>
|
||||
</ArgumentTypeCoercion>
|
||||
<DeprecatedMethod>
|
||||
<code><![CDATA[Config::getInstance()]]></code>
|
||||
</DeprecatedMethod>
|
||||
<MixedArgument>
|
||||
<code><![CDATA[Current::$database]]></code>
|
||||
<code><![CDATA[Current::$database]]></code>
|
||||
@ -1681,13 +1610,10 @@
|
||||
<code><![CDATA[__construct]]></code>
|
||||
</PossiblyUnusedMethod>
|
||||
<RiskyTruthyFalsyComparison>
|
||||
<code><![CDATA[empty($config->settings['Servers'][Current::$server]['pmadb'])]]></code>
|
||||
<code><![CDATA[empty($this->config->settings['Servers'][Current::$server]['pmadb'])]]></code>
|
||||
</RiskyTruthyFalsyComparison>
|
||||
</file>
|
||||
<file src="src/Controllers/Operations/TableController.php">
|
||||
<DeprecatedMethod>
|
||||
<code><![CDATA[Config::getInstance()]]></code>
|
||||
</DeprecatedMethod>
|
||||
<MixedArgumentTypeCoercion>
|
||||
<code><![CDATA[is_array($partitionNames) ? $partitionNames : []]]></code>
|
||||
</MixedArgumentTypeCoercion>
|
||||
@ -1711,33 +1637,21 @@
|
||||
</PossiblyUnusedMethod>
|
||||
</file>
|
||||
<file src="src/Controllers/Preferences/ExportController.php">
|
||||
<DeprecatedMethod>
|
||||
<code><![CDATA[Config::getInstance()]]></code>
|
||||
</DeprecatedMethod>
|
||||
<PossiblyUnusedMethod>
|
||||
<code><![CDATA[__construct]]></code>
|
||||
</PossiblyUnusedMethod>
|
||||
</file>
|
||||
<file src="src/Controllers/Preferences/FeaturesController.php">
|
||||
<DeprecatedMethod>
|
||||
<code><![CDATA[Config::getInstance()]]></code>
|
||||
</DeprecatedMethod>
|
||||
<PossiblyUnusedMethod>
|
||||
<code><![CDATA[__construct]]></code>
|
||||
</PossiblyUnusedMethod>
|
||||
</file>
|
||||
<file src="src/Controllers/Preferences/ImportController.php">
|
||||
<DeprecatedMethod>
|
||||
<code><![CDATA[Config::getInstance()]]></code>
|
||||
</DeprecatedMethod>
|
||||
<PossiblyUnusedMethod>
|
||||
<code><![CDATA[__construct]]></code>
|
||||
</PossiblyUnusedMethod>
|
||||
</file>
|
||||
<file src="src/Controllers/Preferences/MainPanelController.php">
|
||||
<DeprecatedMethod>
|
||||
<code><![CDATA[Config::getInstance()]]></code>
|
||||
</DeprecatedMethod>
|
||||
<PossiblyUnusedMethod>
|
||||
<code><![CDATA[__construct]]></code>
|
||||
</PossiblyUnusedMethod>
|
||||
@ -1786,57 +1700,36 @@
|
||||
</RedundantCondition>
|
||||
</file>
|
||||
<file src="src/Controllers/Preferences/NavigationController.php">
|
||||
<DeprecatedMethod>
|
||||
<code><![CDATA[Config::getInstance()]]></code>
|
||||
</DeprecatedMethod>
|
||||
<PossiblyUnusedMethod>
|
||||
<code><![CDATA[__construct]]></code>
|
||||
</PossiblyUnusedMethod>
|
||||
</file>
|
||||
<file src="src/Controllers/Preferences/SqlController.php">
|
||||
<DeprecatedMethod>
|
||||
<code><![CDATA[Config::getInstance()]]></code>
|
||||
</DeprecatedMethod>
|
||||
<PossiblyUnusedMethod>
|
||||
<code><![CDATA[__construct]]></code>
|
||||
</PossiblyUnusedMethod>
|
||||
</file>
|
||||
<file src="src/Controllers/Preferences/TwoFactorController.php">
|
||||
<DeprecatedMethod>
|
||||
<code><![CDATA[Config::getInstance()]]></code>
|
||||
</DeprecatedMethod>
|
||||
<PossiblyUnusedMethod>
|
||||
<code><![CDATA[__construct]]></code>
|
||||
</PossiblyUnusedMethod>
|
||||
</file>
|
||||
<file src="src/Controllers/Server/BinlogController.php">
|
||||
<DeprecatedMethod>
|
||||
<code><![CDATA[Config::getInstance()]]></code>
|
||||
</DeprecatedMethod>
|
||||
<PossiblyUnusedReturnValue>
|
||||
<code><![CDATA[Response]]></code>
|
||||
</PossiblyUnusedReturnValue>
|
||||
</file>
|
||||
<file src="src/Controllers/Server/CollationsController.php">
|
||||
<DeprecatedMethod>
|
||||
<code><![CDATA[Config::getInstance()]]></code>
|
||||
</DeprecatedMethod>
|
||||
<PossiblyUnusedReturnValue>
|
||||
<code><![CDATA[Response]]></code>
|
||||
</PossiblyUnusedReturnValue>
|
||||
</file>
|
||||
<file src="src/Controllers/Server/Databases/CreateController.php">
|
||||
<DeprecatedMethod>
|
||||
<code><![CDATA[Config::getInstance()]]></code>
|
||||
</DeprecatedMethod>
|
||||
<PossiblyUnusedReturnValue>
|
||||
<code><![CDATA[Response]]></code>
|
||||
</PossiblyUnusedReturnValue>
|
||||
</file>
|
||||
<file src="src/Controllers/Server/Databases/DestroyController.php">
|
||||
<DeprecatedMethod>
|
||||
<code><![CDATA[Config::getInstance()]]></code>
|
||||
</DeprecatedMethod>
|
||||
<MixedAssignment>
|
||||
<code><![CDATA[$selectedDbs]]></code>
|
||||
</MixedAssignment>
|
||||
@ -1845,10 +1738,6 @@
|
||||
</PossiblyUnusedReturnValue>
|
||||
</file>
|
||||
<file src="src/Controllers/Server/DatabasesController.php">
|
||||
<DeprecatedMethod>
|
||||
<code><![CDATA[Config::getInstance()]]></code>
|
||||
<code><![CDATA[Config::getInstance()]]></code>
|
||||
</DeprecatedMethod>
|
||||
<MixedArgument>
|
||||
<code><![CDATA[$database['DEFAULT_COLLATION_NAME']]]></code>
|
||||
<code><![CDATA[$database['SCHEMA_NAME']]]></code>
|
||||
@ -1903,11 +1792,6 @@
|
||||
</PossiblyUnusedMethod>
|
||||
</file>
|
||||
<file src="src/Controllers/Server/ImportController.php">
|
||||
<DeprecatedMethod>
|
||||
<code><![CDATA[Config::getInstance()]]></code>
|
||||
<code><![CDATA[Config::getInstance()]]></code>
|
||||
<code><![CDATA[Config::getInstance()]]></code>
|
||||
</DeprecatedMethod>
|
||||
<MixedArrayAccess>
|
||||
<code><![CDATA[$_SESSION[Ajax::SESSION_KEY]['handler']]]></code>
|
||||
<code><![CDATA[$_SESSION[Ajax::SESSION_KEY]['handler']]]></code>
|
||||
@ -2187,9 +2071,6 @@
|
||||
</PossiblyUnusedReturnValue>
|
||||
</file>
|
||||
<file src="src/Controllers/Sql/SqlController.php">
|
||||
<DeprecatedMethod>
|
||||
<code><![CDATA[Config::getInstance()]]></code>
|
||||
</DeprecatedMethod>
|
||||
<MixedArgument>
|
||||
<code><![CDATA[$request->getQueryParam('sql_signature')]]></code>
|
||||
</MixedArgument>
|
||||
@ -2199,9 +2080,6 @@
|
||||
</MixedAssignment>
|
||||
</file>
|
||||
<file src="src/Controllers/SyncFavoriteTablesController.php">
|
||||
<DeprecatedMethod>
|
||||
<code><![CDATA[Config::getInstance()]]></code>
|
||||
</DeprecatedMethod>
|
||||
<MixedArrayAccess>
|
||||
<code><![CDATA[$value['db']]]></code>
|
||||
<code><![CDATA[$value['table']]]></code>
|
||||
@ -2278,9 +2156,6 @@
|
||||
</PossiblyUnusedReturnValue>
|
||||
</file>
|
||||
<file src="src/Controllers/Table/ChartController.php">
|
||||
<DeprecatedMethod>
|
||||
<code><![CDATA[Config::getInstance()]]></code>
|
||||
</DeprecatedMethod>
|
||||
<MixedArgument>
|
||||
<code><![CDATA[Current::$database]]></code>
|
||||
<code><![CDATA[Current::$sqlQuery]]></code>
|
||||
@ -2353,9 +2228,6 @@
|
||||
</PossiblyUnusedReturnValue>
|
||||
</file>
|
||||
<file src="src/Controllers/Table/DeleteRowsController.php">
|
||||
<DeprecatedMethod>
|
||||
<code><![CDATA[Config::getInstance()]]></code>
|
||||
</DeprecatedMethod>
|
||||
<InvalidArgument>
|
||||
<code><![CDATA[$_REQUEST['pos']]]></code>
|
||||
</InvalidArgument>
|
||||
@ -2437,9 +2309,6 @@
|
||||
</UnusedProperty>
|
||||
</file>
|
||||
<file src="src/Controllers/Table/FindReplaceController.php">
|
||||
<DeprecatedMethod>
|
||||
<code><![CDATA[Config::getInstance()]]></code>
|
||||
</DeprecatedMethod>
|
||||
<MixedArgument>
|
||||
<code><![CDATA[$column]]></code>
|
||||
<code><![CDATA[$column]]></code>
|
||||
@ -2487,10 +2356,6 @@
|
||||
</PossiblyInvalidArgument>
|
||||
</file>
|
||||
<file src="src/Controllers/Table/GisVisualizationController.php">
|
||||
<DeprecatedMethod>
|
||||
<code><![CDATA[Config::getInstance()]]></code>
|
||||
<code><![CDATA[Config::getInstance()]]></code>
|
||||
</DeprecatedMethod>
|
||||
<MixedArrayAccess>
|
||||
<code><![CDATA[$_SESSION['tmpval']['max_rows']]]></code>
|
||||
<code><![CDATA[$_SESSION['tmpval']['pos']]]></code>
|
||||
@ -2507,11 +2372,6 @@
|
||||
</RiskyCast>
|
||||
</file>
|
||||
<file src="src/Controllers/Table/ImportController.php">
|
||||
<DeprecatedMethod>
|
||||
<code><![CDATA[Config::getInstance()]]></code>
|
||||
<code><![CDATA[Config::getInstance()]]></code>
|
||||
<code><![CDATA[Config::getInstance()]]></code>
|
||||
</DeprecatedMethod>
|
||||
<MixedArrayAccess>
|
||||
<code><![CDATA[$_SESSION[Ajax::SESSION_KEY]['handler']]]></code>
|
||||
<code><![CDATA[$_SESSION[Ajax::SESSION_KEY]['handler']]]></code>
|
||||
@ -2540,9 +2400,6 @@
|
||||
</PossiblyUnusedReturnValue>
|
||||
</file>
|
||||
<file src="src/Controllers/Table/IndexesController.php">
|
||||
<DeprecatedMethod>
|
||||
<code><![CDATA[Config::getInstance()]]></code>
|
||||
</DeprecatedMethod>
|
||||
<MixedArgument>
|
||||
<code><![CDATA[$_POST['index']['columns']['names']]]></code>
|
||||
<code><![CDATA[$fields]]></code>
|
||||
@ -2629,9 +2486,6 @@
|
||||
</PossiblyUnusedReturnValue>
|
||||
</file>
|
||||
<file src="src/Controllers/Table/PrivilegesController.php">
|
||||
<DeprecatedMethod>
|
||||
<code><![CDATA[Config::getInstance()]]></code>
|
||||
</DeprecatedMethod>
|
||||
<PossiblyUnusedReturnValue>
|
||||
<code><![CDATA[Response]]></code>
|
||||
</PossiblyUnusedReturnValue>
|
||||
@ -2642,11 +2496,6 @@
|
||||
</PossiblyUnusedReturnValue>
|
||||
</file>
|
||||
<file src="src/Controllers/Table/RelationController.php">
|
||||
<DeprecatedMethod>
|
||||
<code><![CDATA[Config::getInstance()]]></code>
|
||||
<code><![CDATA[Config::getInstance()]]></code>
|
||||
<code><![CDATA[Config::getInstance()]]></code>
|
||||
</DeprecatedMethod>
|
||||
<InvalidArgument>
|
||||
<code><![CDATA[$_POST['destination_column']]]></code>
|
||||
<code><![CDATA[$_POST['destination_db']]]></code>
|
||||
@ -2756,11 +2605,6 @@
|
||||
</RiskyTruthyFalsyComparison>
|
||||
</file>
|
||||
<file src="src/Controllers/Table/SearchController.php">
|
||||
<DeprecatedMethod>
|
||||
<code><![CDATA[Config::getInstance()]]></code>
|
||||
<code><![CDATA[Config::getInstance()]]></code>
|
||||
<code><![CDATA[Config::getInstance()]]></code>
|
||||
</DeprecatedMethod>
|
||||
<MixedArgument>
|
||||
<code><![CDATA[$foreignData->foreignField]]></code>
|
||||
</MixedArgument>
|
||||
@ -2778,7 +2622,7 @@
|
||||
<code><![CDATA[Response]]></code>
|
||||
</PossiblyUnusedReturnValue>
|
||||
<RedundantCastGivenDocblockType>
|
||||
<code><![CDATA[(int) $config->settings['MaxRows']]]></code>
|
||||
<code><![CDATA[(int) $this->config->settings['MaxRows']]]></code>
|
||||
</RedundantCastGivenDocblockType>
|
||||
<RiskyTruthyFalsyComparison>
|
||||
<code><![CDATA[empty($row->collation)]]></code>
|
||||
@ -2868,9 +2712,6 @@
|
||||
</PossiblyUnusedMethod>
|
||||
</file>
|
||||
<file src="src/Controllers/Table/Structure/ReservedWordCheckController.php">
|
||||
<DeprecatedMethod>
|
||||
<code><![CDATA[Config::getInstance()]]></code>
|
||||
</DeprecatedMethod>
|
||||
<MixedArgument>
|
||||
<code><![CDATA[$column]]></code>
|
||||
</MixedArgument>
|
||||
@ -2887,9 +2728,6 @@
|
||||
</RiskyTruthyFalsyComparison>
|
||||
</file>
|
||||
<file src="src/Controllers/Table/Structure/SaveController.php">
|
||||
<DeprecatedMethod>
|
||||
<code><![CDATA[Config::getInstance()]]></code>
|
||||
</DeprecatedMethod>
|
||||
<InvalidArgument>
|
||||
<code><![CDATA[$adjustPrivileges]]></code>
|
||||
</InvalidArgument>
|
||||
@ -2990,10 +2828,6 @@
|
||||
</PossiblyUnusedReturnValue>
|
||||
</file>
|
||||
<file src="src/Controllers/Table/StructureController.php">
|
||||
<DeprecatedMethod>
|
||||
<code><![CDATA[Config::getInstance()]]></code>
|
||||
<code><![CDATA[Config::getInstance()]]></code>
|
||||
</DeprecatedMethod>
|
||||
<MixedArgument>
|
||||
<code><![CDATA[Current::$table]]></code>
|
||||
</MixedArgument>
|
||||
@ -3062,12 +2896,6 @@
|
||||
</MixedPropertyTypeCoercion>
|
||||
</file>
|
||||
<file src="src/Controllers/Table/ZoomSearchController.php">
|
||||
<DeprecatedMethod>
|
||||
<code><![CDATA[Config::getInstance()]]></code>
|
||||
<code><![CDATA[Config::getInstance()]]></code>
|
||||
<code><![CDATA[Config::getInstance()]]></code>
|
||||
<code><![CDATA[Config::getInstance()]]></code>
|
||||
</DeprecatedMethod>
|
||||
<InvalidArrayOffset>
|
||||
<code><![CDATA[$row[$_POST['criteriaColumnNames'][0]]]]></code>
|
||||
<code><![CDATA[$row[$_POST['criteriaColumnNames'][1]]]]></code>
|
||||
@ -3107,7 +2935,7 @@
|
||||
<code><![CDATA[Response]]></code>
|
||||
</PossiblyUnusedReturnValue>
|
||||
<RedundantCastGivenDocblockType>
|
||||
<code><![CDATA[(int) $config->settings['maxRowPlotLimit']]]></code>
|
||||
<code><![CDATA[(int) $this->config->settings['maxRowPlotLimit']]]></code>
|
||||
</RedundantCastGivenDocblockType>
|
||||
<RiskyCast>
|
||||
<code><![CDATA[$_POST['maxPlotLimit']]]></code>
|
||||
@ -3123,9 +2951,6 @@
|
||||
</PossiblyUnusedMethod>
|
||||
</file>
|
||||
<file src="src/Controllers/ThemeSetController.php">
|
||||
<DeprecatedMethod>
|
||||
<code><![CDATA[Config::getInstance()]]></code>
|
||||
</DeprecatedMethod>
|
||||
<PossiblyUnusedReturnValue>
|
||||
<code><![CDATA[Response]]></code>
|
||||
</PossiblyUnusedReturnValue>
|
||||
@ -3193,9 +3018,6 @@
|
||||
</RiskyTruthyFalsyComparison>
|
||||
</file>
|
||||
<file src="src/Controllers/UserPasswordController.php">
|
||||
<DeprecatedMethod>
|
||||
<code><![CDATA[Config::getInstance()]]></code>
|
||||
</DeprecatedMethod>
|
||||
<MixedArgument>
|
||||
<code><![CDATA[$message->getDisplay()]]></code>
|
||||
</MixedArgument>
|
||||
@ -10129,6 +9951,9 @@
|
||||
</file>
|
||||
<file src="tests/unit/Controllers/Database/StructureControllerTest.php">
|
||||
<DeprecatedMethod>
|
||||
<code><![CDATA[Config::getInstance()]]></code>
|
||||
<code><![CDATA[Config::getInstance()]]></code>
|
||||
<code><![CDATA[Config::getInstance()]]></code>
|
||||
<code><![CDATA[Config::getInstance()]]></code>
|
||||
<code><![CDATA[Config::getInstance()]]></code>
|
||||
<code><![CDATA[Config::getInstance()]]></code>
|
||||
@ -10220,7 +10045,6 @@
|
||||
<file src="tests/unit/Controllers/Import/ImportControllerTest.php">
|
||||
<DeprecatedMethod>
|
||||
<code><![CDATA[Config::getInstance()]]></code>
|
||||
<code><![CDATA[Config::getInstance()]]></code>
|
||||
</DeprecatedMethod>
|
||||
</file>
|
||||
<file src="tests/unit/Controllers/Navigation/UpdateNavWidthConfigControllerTest.php">
|
||||
@ -10268,12 +10092,14 @@
|
||||
</file>
|
||||
<file src="tests/unit/Controllers/Server/BinlogControllerTest.php">
|
||||
<DeprecatedMethod>
|
||||
<code><![CDATA[Config::getInstance()]]></code>
|
||||
<code><![CDATA[Config::getInstance()]]></code>
|
||||
<code><![CDATA[DatabaseInterface::getInstance()]]></code>
|
||||
</DeprecatedMethod>
|
||||
</file>
|
||||
<file src="tests/unit/Controllers/Server/CollationsControllerTest.php">
|
||||
<DeprecatedMethod>
|
||||
<code><![CDATA[Config::getInstance()]]></code>
|
||||
<code><![CDATA[Config::getInstance()]]></code>
|
||||
<code><![CDATA[DatabaseInterface::getInstance()]]></code>
|
||||
</DeprecatedMethod>
|
||||
@ -10504,6 +10330,7 @@
|
||||
<file src="tests/unit/Controllers/Table/IndexesControllerTest.php">
|
||||
<DeprecatedMethod>
|
||||
<code><![CDATA[Config::getInstance()]]></code>
|
||||
<code><![CDATA[Config::getInstance()]]></code>
|
||||
</DeprecatedMethod>
|
||||
</file>
|
||||
<file src="tests/unit/Controllers/Table/PrivilegesControllerTest.php">
|
||||
@ -10515,13 +10342,16 @@
|
||||
<file src="tests/unit/Controllers/Table/RelationControllerTest.php">
|
||||
<DeprecatedMethod>
|
||||
<code><![CDATA[Config::getInstance()]]></code>
|
||||
<code><![CDATA[Config::getInstance()]]></code>
|
||||
<code><![CDATA[Config::getInstance()]]></code>
|
||||
<code><![CDATA[Config::getInstance()]]></code>
|
||||
<code><![CDATA[Config::getInstance()]]></code>
|
||||
</DeprecatedMethod>
|
||||
</file>
|
||||
<file src="tests/unit/Controllers/Table/ReplaceControllerTest.php">
|
||||
<DeprecatedMethod>
|
||||
<code><![CDATA[Config::getInstance()]]></code>
|
||||
<code><![CDATA[Config::getInstance()]]></code>
|
||||
<code><![CDATA[Config::getInstance()]]></code>
|
||||
</DeprecatedMethod>
|
||||
</file>
|
||||
<file src="tests/unit/Controllers/Table/SqlControllerTest.php">
|
||||
|
||||
@ -18,9 +18,9 @@ use const SQL_DIR;
|
||||
/**
|
||||
* Displays status of phpMyAdmin configuration storage
|
||||
*/
|
||||
final class CheckRelationsController implements InvocableController
|
||||
final readonly class CheckRelationsController implements InvocableController
|
||||
{
|
||||
public function __construct(private readonly ResponseRenderer $response, private readonly Relation $relation)
|
||||
public function __construct(private ResponseRenderer $response, private Relation $relation, private Config $config)
|
||||
{
|
||||
}
|
||||
|
||||
@ -56,7 +56,7 @@ final class CheckRelationsController implements InvocableController
|
||||
|
||||
$this->response->render('relation/check_relations', [
|
||||
'db' => $db?->getName() ?? '',
|
||||
'zero_conf' => Config::getInstance()->settings['ZeroConf'],
|
||||
'zero_conf' => $this->config->settings['ZeroConf'],
|
||||
'relation_parameters' => $relationParameters->toArray(),
|
||||
'sql_dir' => SQL_DIR,
|
||||
'config_storage_database_name' => $cfgStorageDbName,
|
||||
|
||||
@ -13,11 +13,12 @@ use PhpMyAdmin\ResponseRenderer;
|
||||
|
||||
use function __;
|
||||
|
||||
final class AddController implements InvocableController
|
||||
final readonly class AddController implements InvocableController
|
||||
{
|
||||
public function __construct(
|
||||
private readonly ResponseRenderer $response,
|
||||
private readonly BookmarkRepository $bookmarkRepository,
|
||||
private ResponseRenderer $response,
|
||||
private BookmarkRepository $bookmarkRepository,
|
||||
private Config $config,
|
||||
) {
|
||||
}
|
||||
|
||||
@ -31,7 +32,7 @@ final class AddController implements InvocableController
|
||||
$bookmark = $this->bookmarkRepository->createBookmark(
|
||||
$bookmarkQuery,
|
||||
$label,
|
||||
Config::getInstance()->selectedServer['user'],
|
||||
$this->config->selectedServer['user'],
|
||||
$db,
|
||||
$shared === 'true',
|
||||
);
|
||||
@ -43,7 +44,7 @@ final class AddController implements InvocableController
|
||||
|
||||
$bookmarkFields = [
|
||||
'bkm_database' => $db,
|
||||
'bkm_user' => Config::getInstance()->selectedServer['user'],
|
||||
'bkm_user' => $this->config->selectedServer['user'],
|
||||
'bkm_sql_query' => $bookmarkQuery,
|
||||
'bkm_label' => $label,
|
||||
];
|
||||
|
||||
@ -24,11 +24,12 @@ use function is_numeric;
|
||||
use function parse_str;
|
||||
use function sprintf;
|
||||
|
||||
final class CentralColumnsController implements InvocableController
|
||||
final readonly class CentralColumnsController implements InvocableController
|
||||
{
|
||||
public function __construct(
|
||||
private readonly ResponseRenderer $response,
|
||||
private readonly CentralColumns $centralColumns,
|
||||
private ResponseRenderer $response,
|
||||
private CentralColumns $centralColumns,
|
||||
private Config $config,
|
||||
) {
|
||||
}
|
||||
|
||||
@ -139,7 +140,7 @@ final class CentralColumnsController implements InvocableController
|
||||
$numberOfColumns = $this->centralColumns->getColumnsCount(
|
||||
$db->getName(),
|
||||
$pos,
|
||||
Config::getInstance()->settings['MaxRows'],
|
||||
$this->config->settings['MaxRows'],
|
||||
);
|
||||
Current::$message = Message::success(
|
||||
sprintf(__('Showing rows %1$s - %2$s.'), $pos + 1, $pos + $numberOfColumns),
|
||||
|
||||
@ -28,13 +28,14 @@ use function __;
|
||||
use function is_numeric;
|
||||
use function is_string;
|
||||
|
||||
final class ImportController implements InvocableController
|
||||
final readonly class ImportController implements InvocableController
|
||||
{
|
||||
public function __construct(
|
||||
private readonly ResponseRenderer $response,
|
||||
private readonly DatabaseInterface $dbi,
|
||||
private readonly PageSettings $pageSettings,
|
||||
private readonly DbTableExists $dbTableExists,
|
||||
private ResponseRenderer $response,
|
||||
private DatabaseInterface $dbi,
|
||||
private PageSettings $pageSettings,
|
||||
private DbTableExists $dbTableExists,
|
||||
private Config $config,
|
||||
) {
|
||||
}
|
||||
|
||||
@ -50,8 +51,6 @@ final class ImportController implements InvocableController
|
||||
return $this->response->missingParameterError('db');
|
||||
}
|
||||
|
||||
$config = Config::getInstance();
|
||||
|
||||
$databaseName = DatabaseName::tryFrom($request->getParam('db'));
|
||||
if ($databaseName === null || ! $this->dbTableExists->selectDatabase($databaseName)) {
|
||||
if ($request->isAjax()) {
|
||||
@ -88,7 +87,7 @@ final class ImportController implements InvocableController
|
||||
$localImportFile = $_REQUEST['local_import_file'] ?? null;
|
||||
$compressions = Import::getCompressions();
|
||||
|
||||
$charsets = Charsets::getCharsets($this->dbi, $config->selectedServer['DisableIS']);
|
||||
$charsets = Charsets::getCharsets($this->dbi, $this->config->selectedServer['DisableIS']);
|
||||
|
||||
$idKey = $_SESSION[Ajax::SESSION_KEY]['handler']::getIdKey();
|
||||
$hiddenInputs = [$idKey => $uploadId, 'import_type' => 'database', 'db' => Current::$database];
|
||||
@ -114,19 +113,19 @@ final class ImportController implements InvocableController
|
||||
'skip_queries_default' => $skipQueriesDefault,
|
||||
'is_allow_interrupt_checked' => $isAllowInterruptChecked,
|
||||
'local_import_file' => $localImportFile,
|
||||
'is_upload' => $config->isUploadEnabled(),
|
||||
'upload_dir' => $config->settings['UploadDir'] ?? null,
|
||||
'is_upload' => $this->config->isUploadEnabled(),
|
||||
'upload_dir' => $this->config->settings['UploadDir'] ?? null,
|
||||
'timeout_passed_global' => ImportSettings::$timeoutPassed,
|
||||
'compressions' => $compressions,
|
||||
'is_encoding_supported' => Encoding::isSupported(),
|
||||
'encodings' => Encoding::listEncodings(),
|
||||
'import_charset' => $config->settings['Import']['charset'] ?? null,
|
||||
'import_charset' => $this->config->settings['Import']['charset'] ?? null,
|
||||
'timeout_passed' => $timeoutPassed,
|
||||
'offset' => $offset,
|
||||
'can_convert_kanji' => Encoding::canConvertKanji(),
|
||||
'charsets' => $charsets,
|
||||
'is_foreign_key_check' => ForeignKey::isCheckEnabled(),
|
||||
'user_upload_dir' => Util::userDir($config->settings['UploadDir'] ?? ''),
|
||||
'user_upload_dir' => Util::userDir($this->config->settings['UploadDir'] ?? ''),
|
||||
'local_files' => Import::getLocalFiles($importList),
|
||||
]);
|
||||
|
||||
@ -139,7 +138,7 @@ final class ImportController implements InvocableController
|
||||
return $formatParam;
|
||||
}
|
||||
|
||||
return Config::getInstance()->settings['Import']['format'];
|
||||
return $this->config->settings['Import']['format'];
|
||||
}
|
||||
|
||||
private function getSkipQueries(mixed $skipQueriesParam): int
|
||||
@ -148,6 +147,6 @@ final class ImportController implements InvocableController
|
||||
return (int) $skipQueriesParam;
|
||||
}
|
||||
|
||||
return Config::getInstance()->settings['Import']['skip_queries'];
|
||||
return $this->config->settings['Import']['skip_queries'];
|
||||
}
|
||||
}
|
||||
|
||||
@ -25,12 +25,13 @@ use function mb_strtolower;
|
||||
/**
|
||||
* Controller for database privileges
|
||||
*/
|
||||
final class PrivilegesController implements InvocableController
|
||||
final readonly class PrivilegesController implements InvocableController
|
||||
{
|
||||
public function __construct(
|
||||
private readonly ResponseRenderer $response,
|
||||
private readonly Privileges $privileges,
|
||||
private readonly DatabaseInterface $dbi,
|
||||
private ResponseRenderer $response,
|
||||
private Privileges $privileges,
|
||||
private DatabaseInterface $dbi,
|
||||
private Config $config,
|
||||
) {
|
||||
}
|
||||
|
||||
@ -71,7 +72,7 @@ final class PrivilegesController implements InvocableController
|
||||
)->getDisplay());
|
||||
}
|
||||
|
||||
$scriptName = Url::getFromRoute(Config::getInstance()->settings['DefaultTabDatabase']);
|
||||
$scriptName = Url::getFromRoute($this->config->settings['DefaultTabDatabase']);
|
||||
|
||||
$privileges = [];
|
||||
if ($this->dbi->isSuperUser()) {
|
||||
|
||||
@ -40,15 +40,16 @@ use const ENT_QUOTES;
|
||||
/**
|
||||
* Routines management.
|
||||
*/
|
||||
final class RoutinesController implements InvocableController
|
||||
final readonly class RoutinesController implements InvocableController
|
||||
{
|
||||
public function __construct(
|
||||
private readonly ResponseRenderer $response,
|
||||
private readonly Template $template,
|
||||
private readonly UserPrivilegesFactory $userPrivilegesFactory,
|
||||
private readonly DatabaseInterface $dbi,
|
||||
private readonly Routines $routines,
|
||||
private readonly DbTableExists $dbTableExists,
|
||||
private ResponseRenderer $response,
|
||||
private Template $template,
|
||||
private UserPrivilegesFactory $userPrivilegesFactory,
|
||||
private DatabaseInterface $dbi,
|
||||
private Routines $routines,
|
||||
private DbTableExists $dbTableExists,
|
||||
private Config $config,
|
||||
) {
|
||||
}
|
||||
|
||||
@ -60,7 +61,6 @@ final class RoutinesController implements InvocableController
|
||||
|
||||
$userPrivileges = $this->userPrivilegesFactory->getPrivileges();
|
||||
|
||||
$config = Config::getInstance();
|
||||
if (! $request->isAjax()) {
|
||||
if (Current::$database === '') {
|
||||
return $this->response->missingParameterError('db');
|
||||
@ -241,7 +241,7 @@ final class RoutinesController implements InvocableController
|
||||
);
|
||||
}
|
||||
|
||||
$charsets = Charsets::getCharsets($this->dbi, $config->selectedServer['DisableIS']);
|
||||
$charsets = Charsets::getCharsets($this->dbi, $this->config->selectedServer['DisableIS']);
|
||||
|
||||
$editor = $this->template->render('database/routines/editor_form', [
|
||||
'db' => Current::$database,
|
||||
@ -349,7 +349,7 @@ final class RoutinesController implements InvocableController
|
||||
'db' => Current::$database,
|
||||
'routine' => $routine,
|
||||
'ajax' => $request->isAjax(),
|
||||
'show_function_fields' => $config->settings['ShowFunctionFields'],
|
||||
'show_function_fields' => $this->config->settings['ShowFunctionFields'],
|
||||
'params' => $params,
|
||||
]);
|
||||
if ($request->isAjax()) {
|
||||
@ -459,7 +459,7 @@ final class RoutinesController implements InvocableController
|
||||
|
||||
$items = Routines::getDetails($this->dbi, Current::$database, $type);
|
||||
$totalNumRoutines = count($items);
|
||||
$pageSize = $config->settings['MaxRoutineList'];
|
||||
$pageSize = $this->config->settings['MaxRoutineList'];
|
||||
$pos = (int) $request->getParam('pos');
|
||||
|
||||
// Checks if there are any routines to be shown on current page.
|
||||
|
||||
@ -22,13 +22,14 @@ use PhpMyAdmin\UrlParams;
|
||||
|
||||
use function __;
|
||||
|
||||
final class SearchController implements InvocableController
|
||||
final readonly class SearchController implements InvocableController
|
||||
{
|
||||
public function __construct(
|
||||
private readonly ResponseRenderer $response,
|
||||
private readonly Template $template,
|
||||
private readonly DatabaseInterface $dbi,
|
||||
private readonly DbTableExists $dbTableExists,
|
||||
private ResponseRenderer $response,
|
||||
private Template $template,
|
||||
private DatabaseInterface $dbi,
|
||||
private DbTableExists $dbTableExists,
|
||||
private Config $config,
|
||||
) {
|
||||
}
|
||||
|
||||
@ -40,8 +41,7 @@ final class SearchController implements InvocableController
|
||||
return $this->response->missingParameterError('db');
|
||||
}
|
||||
|
||||
$config = Config::getInstance();
|
||||
$errorUrl = Url::getFromRoute($config->settings['DefaultTabDatabase']);
|
||||
$errorUrl = Url::getFromRoute($this->config->settings['DefaultTabDatabase']);
|
||||
$errorUrl .= Url::getCommon(['db' => Current::$database], '&');
|
||||
|
||||
$databaseName = DatabaseName::tryFrom($request->getParam('db'));
|
||||
@ -58,7 +58,7 @@ final class SearchController implements InvocableController
|
||||
return $this->response->response();
|
||||
}
|
||||
|
||||
if (! $config->settings['UseDbSearch']) {
|
||||
if (! $this->config->settings['UseDbSearch']) {
|
||||
$errorMessage = __(
|
||||
'Searching inside the database is disabled by the [code]$cfg[\'UseDbSearch\'][/code] configuration.',
|
||||
);
|
||||
|
||||
@ -26,16 +26,17 @@ use PhpMyAdmin\Utils\ForeignKey;
|
||||
|
||||
use function __;
|
||||
|
||||
final class EmptyTableController implements InvocableController
|
||||
final readonly class EmptyTableController implements InvocableController
|
||||
{
|
||||
public function __construct(
|
||||
private readonly ResponseRenderer $response,
|
||||
private readonly Template $template,
|
||||
private readonly DatabaseInterface $dbi,
|
||||
private readonly Relation $relation,
|
||||
private readonly RelationCleanup $relationCleanup,
|
||||
private readonly FlashMessenger $flashMessenger,
|
||||
private readonly StructureController $structureController,
|
||||
private ResponseRenderer $response,
|
||||
private Template $template,
|
||||
private DatabaseInterface $dbi,
|
||||
private Relation $relation,
|
||||
private RelationCleanup $relationCleanup,
|
||||
private FlashMessenger $flashMessenger,
|
||||
private StructureController $structureController,
|
||||
private Config $config,
|
||||
) {
|
||||
}
|
||||
|
||||
@ -78,7 +79,7 @@ final class EmptyTableController implements InvocableController
|
||||
new Transformations(),
|
||||
$this->template,
|
||||
new BookmarkRepository($this->dbi, $this->relation),
|
||||
Config::getInstance(),
|
||||
$this->config,
|
||||
);
|
||||
|
||||
$_REQUEST['pos'] = $sql->calculatePosForLastPage(Current::$database, Current::$table, $_REQUEST['pos']);
|
||||
|
||||
@ -27,12 +27,13 @@ use function json_decode;
|
||||
use function json_encode;
|
||||
use function md5;
|
||||
|
||||
final class FavoriteTableController implements InvocableController
|
||||
final readonly class FavoriteTableController implements InvocableController
|
||||
{
|
||||
public function __construct(
|
||||
private readonly ResponseRenderer $response,
|
||||
private readonly Template $template,
|
||||
private readonly DbTableExists $dbTableExists,
|
||||
private ResponseRenderer $response,
|
||||
private Template $template,
|
||||
private DbTableExists $dbTableExists,
|
||||
private Config $config,
|
||||
) {
|
||||
}
|
||||
|
||||
@ -42,8 +43,6 @@ final class FavoriteTableController implements InvocableController
|
||||
return $this->response->response();
|
||||
}
|
||||
|
||||
$config = Config::getInstance();
|
||||
|
||||
if (! $request->isAjax()) {
|
||||
return $this->response->response();
|
||||
}
|
||||
@ -56,7 +55,7 @@ final class FavoriteTableController implements InvocableController
|
||||
}
|
||||
|
||||
// Required to keep each user's preferences separate.
|
||||
$user = hash('sha1', $config->selectedServer['user']);
|
||||
$user = hash('sha1', $this->config->selectedServer['user']);
|
||||
|
||||
$databaseName = DatabaseName::tryFrom($request->getParam('db'));
|
||||
if ($databaseName === null || ! $this->dbTableExists->selectDatabase($databaseName)) {
|
||||
@ -81,7 +80,7 @@ final class FavoriteTableController implements InvocableController
|
||||
} elseif (isset($_REQUEST['add_favorite'])) {
|
||||
if (! $alreadyFavorite) {
|
||||
$numTables = count($favoriteInstance->getTables());
|
||||
if ($numTables == $config->settings['NumFavoriteTables']) {
|
||||
if ($numTables == $this->config->settings['NumFavoriteTables']) {
|
||||
$changes = false;
|
||||
} else {
|
||||
// Otherwise add to favorite list.
|
||||
|
||||
@ -87,6 +87,7 @@ final class StructureController implements InvocableController
|
||||
private readonly TrackingChecker $trackingChecker,
|
||||
private readonly PageSettings $pageSettings,
|
||||
private readonly DbTableExists $dbTableExists,
|
||||
private readonly Config $config,
|
||||
) {
|
||||
$this->replicationInfo = new ReplicationInfo($this->dbi);
|
||||
}
|
||||
@ -106,7 +107,7 @@ final class StructureController implements InvocableController
|
||||
/**
|
||||
* whether to display extended stats
|
||||
*/
|
||||
$this->isShowStats = Config::getInstance()->settings['ShowStats'];
|
||||
$this->isShowStats = $this->config->settings['ShowStats'];
|
||||
|
||||
/**
|
||||
* whether selected db is information_schema
|
||||
@ -129,8 +130,6 @@ final class StructureController implements InvocableController
|
||||
return $this->response->missingParameterError('db');
|
||||
}
|
||||
|
||||
$config = Config::getInstance();
|
||||
|
||||
$databaseName = DatabaseName::tryFrom($request->getParam('db'));
|
||||
if ($databaseName === null || ! $this->dbTableExists->selectDatabase($databaseName)) {
|
||||
if ($request->isAjax()) {
|
||||
@ -156,7 +155,7 @@ final class StructureController implements InvocableController
|
||||
if ($this->totalNumTables > 0 && $this->position > $this->totalNumTables) {
|
||||
$this->response->redirectToRoute('/database/structure', [
|
||||
'db' => Current::$database,
|
||||
'pos' => max(0, $this->totalNumTables - $config->settings['MaxTableList']),
|
||||
'pos' => max(0, $this->totalNumTables - $this->config->settings['MaxTableList']),
|
||||
'reload' => 1,
|
||||
]);
|
||||
}
|
||||
@ -184,7 +183,7 @@ final class StructureController implements InvocableController
|
||||
$urlParams,
|
||||
Url::getFromRoute('/database/structure'),
|
||||
'frame_content',
|
||||
$config->settings['MaxTableList'],
|
||||
$this->config->settings['MaxTableList'],
|
||||
);
|
||||
|
||||
$tableList = $this->displayTableList($replicaInfo);
|
||||
@ -220,9 +219,8 @@ final class StructureController implements InvocableController
|
||||
$createTimeAll = null;
|
||||
$updateTimeAll = null;
|
||||
$checkTimeAll = null;
|
||||
$config = Config::getInstance();
|
||||
$numColumns = $config->settings['PropertiesNumColumns'] > 1
|
||||
? ceil($this->numTables / $config->settings['PropertiesNumColumns']) + 1
|
||||
$numColumns = $this->config->settings['PropertiesNumColumns'] > 1
|
||||
? ceil($this->numTables / $this->config->settings['PropertiesNumColumns']) + 1
|
||||
: 0;
|
||||
$rowCount = 0;
|
||||
$sumSize = 0;
|
||||
@ -267,7 +265,7 @@ final class StructureController implements InvocableController
|
||||
if (isset($currentTable['Collation'])) {
|
||||
$tableCollation = Charsets::findCollationByName(
|
||||
$this->dbi,
|
||||
$config->selectedServer['DisableIS'],
|
||||
$this->config->selectedServer['DisableIS'],
|
||||
$currentTable['Collation'],
|
||||
);
|
||||
if ($tableCollation !== null) {
|
||||
@ -291,7 +289,7 @@ final class StructureController implements InvocableController
|
||||
}
|
||||
}
|
||||
|
||||
if ($config->settings['ShowDbStructureCharset']) {
|
||||
if ($this->config->settings['ShowDbStructureCharset']) {
|
||||
$charset = '';
|
||||
if (isset($tableCollation)) {
|
||||
$charset = $tableCollation->getCharset();
|
||||
@ -299,7 +297,7 @@ final class StructureController implements InvocableController
|
||||
}
|
||||
|
||||
$createTime = null;
|
||||
if ($config->settings['ShowDbStructureCreation'] && isset($currentTable['Create_time'])) {
|
||||
if ($this->config->settings['ShowDbStructureCreation'] && isset($currentTable['Create_time'])) {
|
||||
$createTime = $this->createDateTime($currentTable['Create_time']);
|
||||
if ($createTime !== null && ($createTimeAll === null || $createTime < $createTimeAll)) {
|
||||
$createTimeAll = $createTime;
|
||||
@ -307,7 +305,7 @@ final class StructureController implements InvocableController
|
||||
}
|
||||
|
||||
$updateTime = null;
|
||||
if ($config->settings['ShowDbStructureLastUpdate'] && isset($currentTable['Update_time'])) {
|
||||
if ($this->config->settings['ShowDbStructureLastUpdate'] && isset($currentTable['Update_time'])) {
|
||||
$updateTime = $this->createDateTime($currentTable['Update_time']);
|
||||
if ($updateTime !== null && ($updateTimeAll === null || $updateTime < $updateTimeAll)) {
|
||||
$updateTimeAll = $updateTime;
|
||||
@ -315,7 +313,7 @@ final class StructureController implements InvocableController
|
||||
}
|
||||
|
||||
$checkTime = null;
|
||||
if ($config->settings['ShowDbStructureLastCheck'] && isset($currentTable['Check_time'])) {
|
||||
if ($this->config->settings['ShowDbStructureLastCheck'] && isset($currentTable['Check_time'])) {
|
||||
$checkTime = $this->createDateTime($currentTable['Check_time']);
|
||||
if ($checkTime !== null && ($checkTimeAll === null || $checkTime < $checkTimeAll)) {
|
||||
$checkTimeAll = $checkTime;
|
||||
@ -369,14 +367,14 @@ final class StructureController implements InvocableController
|
||||
'db' => Current::$database,
|
||||
'db_is_system_schema' => $this->dbIsSystemSchema,
|
||||
'replication' => $replicaInfo['status'],
|
||||
'properties_num_columns' => $config->settings['PropertiesNumColumns'],
|
||||
'properties_num_columns' => $this->config->settings['PropertiesNumColumns'],
|
||||
'is_show_stats' => $this->isShowStats,
|
||||
'show_charset' => $config->settings['ShowDbStructureCharset'],
|
||||
'show_comment' => $config->settings['ShowDbStructureComment'],
|
||||
'show_creation' => $config->settings['ShowDbStructureCreation'],
|
||||
'show_last_update' => $config->settings['ShowDbStructureLastUpdate'],
|
||||
'show_last_check' => $config->settings['ShowDbStructureLastCheck'],
|
||||
'num_favorite_tables' => $config->settings['NumFavoriteTables'],
|
||||
'show_charset' => $this->config->settings['ShowDbStructureCharset'],
|
||||
'show_comment' => $this->config->settings['ShowDbStructureComment'],
|
||||
'show_creation' => $this->config->settings['ShowDbStructureCreation'],
|
||||
'show_last_update' => $this->config->settings['ShowDbStructureLastUpdate'],
|
||||
'show_last_check' => $this->config->settings['ShowDbStructureLastCheck'],
|
||||
'num_favorite_tables' => $this->config->settings['NumFavoriteTables'],
|
||||
'structure_table_rows' => $structureTableRows,
|
||||
]);
|
||||
$structureTableRows = [];
|
||||
@ -431,14 +429,14 @@ final class StructureController implements InvocableController
|
||||
TableName::from($currentTable['TABLE_NAME']),
|
||||
),
|
||||
),
|
||||
'num_favorite_tables' => $config->settings['NumFavoriteTables'],
|
||||
'properties_num_columns' => $config->settings['PropertiesNumColumns'],
|
||||
'limit_chars' => $config->settings['LimitChars'],
|
||||
'show_charset' => $config->settings['ShowDbStructureCharset'],
|
||||
'show_comment' => $config->settings['ShowDbStructureComment'],
|
||||
'show_creation' => $config->settings['ShowDbStructureCreation'],
|
||||
'show_last_update' => $config->settings['ShowDbStructureLastUpdate'],
|
||||
'show_last_check' => $config->settings['ShowDbStructureLastCheck'],
|
||||
'num_favorite_tables' => $this->config->settings['NumFavoriteTables'],
|
||||
'properties_num_columns' => $this->config->settings['PropertiesNumColumns'],
|
||||
'limit_chars' => $this->config->settings['LimitChars'],
|
||||
'show_charset' => $this->config->settings['ShowDbStructureCharset'],
|
||||
'show_comment' => $this->config->settings['ShowDbStructureComment'],
|
||||
'show_creation' => $this->config->settings['ShowDbStructureCreation'],
|
||||
'show_last_update' => $this->config->settings['ShowDbStructureLastUpdate'],
|
||||
'show_last_check' => $this->config->settings['ShowDbStructureLastCheck'],
|
||||
];
|
||||
|
||||
$overallApproxRows = $overallApproxRows || $approxRows;
|
||||
@ -448,7 +446,7 @@ final class StructureController implements InvocableController
|
||||
$databaseCharset = '';
|
||||
$collation = Charsets::findCollationByName(
|
||||
$this->dbi,
|
||||
$config->selectedServer['DisableIS'],
|
||||
$this->config->selectedServer['DisableIS'],
|
||||
$this->dbi->getDbCollation(Current::$database),
|
||||
);
|
||||
if ($collation !== null) {
|
||||
@ -459,7 +457,7 @@ final class StructureController implements InvocableController
|
||||
$relationParameters = $this->relation->getRelationParameters();
|
||||
|
||||
$defaultStorageEngine = '';
|
||||
if ($config->settings['PropertiesNumColumns'] < 2) {
|
||||
if ($this->config->settings['PropertiesNumColumns'] < 2) {
|
||||
// MySQL <= 5.5.2
|
||||
$defaultStorageEngine = $this->dbi->fetchValue('SELECT @@storage_engine;');
|
||||
if (! is_string($defaultStorageEngine) || $defaultStorageEngine === '') {
|
||||
@ -472,14 +470,14 @@ final class StructureController implements InvocableController
|
||||
'db' => Current::$database,
|
||||
'db_is_system_schema' => $this->dbIsSystemSchema,
|
||||
'replication' => $replicaInfo['status'],
|
||||
'properties_num_columns' => $config->settings['PropertiesNumColumns'],
|
||||
'properties_num_columns' => $this->config->settings['PropertiesNumColumns'],
|
||||
'is_show_stats' => $this->isShowStats,
|
||||
'show_charset' => $config->settings['ShowDbStructureCharset'],
|
||||
'show_comment' => $config->settings['ShowDbStructureComment'],
|
||||
'show_creation' => $config->settings['ShowDbStructureCreation'],
|
||||
'show_last_update' => $config->settings['ShowDbStructureLastUpdate'],
|
||||
'show_last_check' => $config->settings['ShowDbStructureLastCheck'],
|
||||
'num_favorite_tables' => $config->settings['NumFavoriteTables'],
|
||||
'show_charset' => $this->config->settings['ShowDbStructureCharset'],
|
||||
'show_comment' => $this->config->settings['ShowDbStructureComment'],
|
||||
'show_creation' => $this->config->settings['ShowDbStructureCreation'],
|
||||
'show_last_update' => $this->config->settings['ShowDbStructureLastUpdate'],
|
||||
'show_last_check' => $this->config->settings['ShowDbStructureLastCheck'],
|
||||
'num_favorite_tables' => $this->config->settings['NumFavoriteTables'],
|
||||
'structure_table_rows' => $structureTableRows,
|
||||
'body_for_table_summary' => [
|
||||
'num_tables' => $this->numTables,
|
||||
@ -495,21 +493,21 @@ final class StructureController implements InvocableController
|
||||
'update_time_all' => $updateTimeAll !== null ? Util::localisedDate($updateTimeAll) : '-',
|
||||
'check_time_all' => $checkTimeAll !== null ? Util::localisedDate($checkTimeAll) : '-',
|
||||
'approx_rows' => $overallApproxRows,
|
||||
'num_favorite_tables' => $config->settings['NumFavoriteTables'],
|
||||
'num_favorite_tables' => $this->config->settings['NumFavoriteTables'],
|
||||
'db' => Current::$database,
|
||||
'properties_num_columns' => $config->settings['PropertiesNumColumns'],
|
||||
'properties_num_columns' => $this->config->settings['PropertiesNumColumns'],
|
||||
'default_storage_engine' => $defaultStorageEngine,
|
||||
'show_charset' => $config->settings['ShowDbStructureCharset'],
|
||||
'show_comment' => $config->settings['ShowDbStructureComment'],
|
||||
'show_creation' => $config->settings['ShowDbStructureCreation'],
|
||||
'show_last_update' => $config->settings['ShowDbStructureLastUpdate'],
|
||||
'show_last_check' => $config->settings['ShowDbStructureLastCheck'],
|
||||
'show_charset' => $this->config->settings['ShowDbStructureCharset'],
|
||||
'show_comment' => $this->config->settings['ShowDbStructureComment'],
|
||||
'show_creation' => $this->config->settings['ShowDbStructureCreation'],
|
||||
'show_last_update' => $this->config->settings['ShowDbStructureLastUpdate'],
|
||||
'show_last_check' => $this->config->settings['ShowDbStructureLastCheck'],
|
||||
],
|
||||
'check_all_tables' => [
|
||||
'overhead_check' => $overheadCheck,
|
||||
'db_is_system_schema' => $this->dbIsSystemSchema,
|
||||
'hidden_fields' => $hiddenFields,
|
||||
'disable_multi_table' => $config->config->DisableMultiTableMaintenance,
|
||||
'disable_multi_table' => $this->config->config->DisableMultiTableMaintenance,
|
||||
'central_columns_work' => $relationParameters->centralColumnsFeature !== null,
|
||||
],
|
||||
]);
|
||||
@ -560,7 +558,7 @@ final class StructureController implements InvocableController
|
||||
&& in_array($currentTable['ENGINE'], ['CSV', 'InnoDB', 'TokuDB'], true)
|
||||
&& ! $currentTable['COUNTED'];
|
||||
|
||||
if ($tableIsView && $currentTable['TABLE_ROWS'] >= Config::getInstance()->settings['MaxExactCountViews']) {
|
||||
if ($tableIsView && $currentTable['TABLE_ROWS'] >= $this->config->settings['MaxExactCountViews']) {
|
||||
$approxRows = true;
|
||||
$showSuperscript = Generator::showHint(
|
||||
Sanitize::convertBBCode(
|
||||
@ -816,7 +814,7 @@ final class StructureController implements InvocableController
|
||||
|
||||
if (
|
||||
(in_array($currentTable['ENGINE'], ['InnoDB', 'TokuDB'], true)
|
||||
&& $currentTable['TABLE_ROWS'] < Config::getInstance()->settings['MaxExactCount'])
|
||||
&& $currentTable['TABLE_ROWS'] < $this->config->settings['MaxExactCount'])
|
||||
|| ! isset($currentTable['TABLE_ROWS'])
|
||||
) {
|
||||
$currentTable['COUNTED'] = true;
|
||||
|
||||
@ -27,13 +27,14 @@ use function sprintf;
|
||||
/**
|
||||
* Tracking configuration for database.
|
||||
*/
|
||||
final class TrackingController implements InvocableController
|
||||
final readonly class TrackingController implements InvocableController
|
||||
{
|
||||
public function __construct(
|
||||
private readonly ResponseRenderer $response,
|
||||
private readonly Tracking $tracking,
|
||||
private readonly DatabaseInterface $dbi,
|
||||
private readonly DbTableExists $dbTableExists,
|
||||
private ResponseRenderer $response,
|
||||
private Tracking $tracking,
|
||||
private DatabaseInterface $dbi,
|
||||
private DbTableExists $dbTableExists,
|
||||
private Config $config,
|
||||
) {
|
||||
}
|
||||
|
||||
@ -45,8 +46,6 @@ final class TrackingController implements InvocableController
|
||||
return $this->response->missingParameterError('db');
|
||||
}
|
||||
|
||||
$config = Config::getInstance();
|
||||
|
||||
$databaseName = DatabaseName::tryFrom($request->getParam('db'));
|
||||
if ($databaseName === null || ! $this->dbTableExists->selectDatabase($databaseName)) {
|
||||
if ($request->isAjax()) {
|
||||
@ -105,7 +104,7 @@ final class TrackingController implements InvocableController
|
||||
'db' => Current::$database,
|
||||
'selected' => $selectedTable,
|
||||
'type' => 'both',
|
||||
'default_statements' => $config->selectedServer['tracking_default_statements'],
|
||||
'default_statements' => $this->config->selectedServer['tracking_default_statements'],
|
||||
]);
|
||||
|
||||
return $this->response->response();
|
||||
|
||||
@ -28,14 +28,15 @@ use function time;
|
||||
/**
|
||||
* Handle error report submission
|
||||
*/
|
||||
final class ErrorReportController implements InvocableController
|
||||
final readonly class ErrorReportController implements InvocableController
|
||||
{
|
||||
public function __construct(
|
||||
private readonly ResponseRenderer $response,
|
||||
private readonly Template $template,
|
||||
private readonly ErrorReport $errorReport,
|
||||
private readonly ErrorHandler $errorHandler,
|
||||
private readonly DatabaseInterface $dbi,
|
||||
private ResponseRenderer $response,
|
||||
private Template $template,
|
||||
private ErrorReport $errorReport,
|
||||
private ErrorHandler $errorHandler,
|
||||
private DatabaseInterface $dbi,
|
||||
private Config $config,
|
||||
) {
|
||||
}
|
||||
|
||||
@ -49,7 +50,6 @@ final class ErrorReportController implements InvocableController
|
||||
return $this->response->response();
|
||||
}
|
||||
|
||||
$config = Config::getInstance();
|
||||
if ($request->hasBodyParam('send_error_report')) {
|
||||
if ($exceptionType === 'php') {
|
||||
/**
|
||||
@ -87,7 +87,7 @@ final class ErrorReportController implements InvocableController
|
||||
|
||||
/* Message to show to the user */
|
||||
if ($success) {
|
||||
if ($automatic === 'true' || $config->config->SendErrorReports === 'always') {
|
||||
if ($automatic === 'true' || $this->config->config->SendErrorReports === 'always') {
|
||||
$msg = __(
|
||||
'An error has been detected and an error report has been '
|
||||
. 'automatically submitted based on your settings.',
|
||||
@ -134,7 +134,7 @@ final class ErrorReportController implements InvocableController
|
||||
}
|
||||
}
|
||||
} elseif ($request->hasBodyParam('get_settings')) {
|
||||
$this->response->addJSON('report_setting', $config->config->SendErrorReports);
|
||||
$this->response->addJSON('report_setting', $this->config->config->SendErrorReports);
|
||||
} elseif ($exceptionType === 'js') {
|
||||
$this->response->addJSON('report_modal', $this->errorReport->getEmptyModal());
|
||||
$this->response->addHTML($this->errorReport->getForm());
|
||||
|
||||
@ -38,12 +38,13 @@ use function is_array;
|
||||
use function register_shutdown_function;
|
||||
use function time;
|
||||
|
||||
final class ExportController implements InvocableController
|
||||
final readonly class ExportController implements InvocableController
|
||||
{
|
||||
public function __construct(
|
||||
private readonly ResponseRenderer $response,
|
||||
private readonly Export $export,
|
||||
private readonly ResponseFactory $responseFactory,
|
||||
private ResponseRenderer $response,
|
||||
private Export $export,
|
||||
private ResponseFactory $responseFactory,
|
||||
private Config $config,
|
||||
) {
|
||||
}
|
||||
|
||||
@ -118,18 +119,17 @@ final class ExportController implements InvocableController
|
||||
return $this->response->response();
|
||||
}
|
||||
|
||||
$config = Config::getInstance();
|
||||
$exportPlugin->setExportOptions($request, $config->settings['Export']);
|
||||
$exportPlugin->setExportOptions($request, $this->config->settings['Export']);
|
||||
|
||||
/**
|
||||
* valid compression methods
|
||||
*/
|
||||
$compressionMethods = [];
|
||||
if ($config->settings['ZipDump'] && function_exists('gzcompress')) {
|
||||
if ($this->config->settings['ZipDump'] && function_exists('gzcompress')) {
|
||||
$compressionMethods[] = 'zip';
|
||||
}
|
||||
|
||||
if ($config->settings['GZipDump'] && function_exists('gzencode')) {
|
||||
if ($this->config->settings['GZipDump'] && function_exists('gzencode')) {
|
||||
$compressionMethods[] = 'gzip';
|
||||
}
|
||||
|
||||
@ -162,7 +162,7 @@ final class ExportController implements InvocableController
|
||||
|
||||
if (($isQuickExport && $quickExportOnServer) || (! $isQuickExport && $onServerParam)) {
|
||||
// Will we save dump on server?
|
||||
Export::$saveOnServer = $config->settings['SaveDir'] !== '';
|
||||
Export::$saveOnServer = $this->config->settings['SaveDir'] !== '';
|
||||
}
|
||||
}
|
||||
|
||||
@ -205,8 +205,8 @@ final class ExportController implements InvocableController
|
||||
* Increase time limit for script execution and initializes some variables
|
||||
*/
|
||||
Util::setTimeLimit();
|
||||
if (! empty($config->settings['MemoryLimit'])) {
|
||||
ini_set('memory_limit', $config->settings['MemoryLimit']);
|
||||
if (! empty($this->config->settings['MemoryLimit'])) {
|
||||
ini_set('memory_limit', $this->config->settings['MemoryLimit']);
|
||||
}
|
||||
|
||||
register_shutdown_function([$this->export, 'shutdown']);
|
||||
@ -229,7 +229,7 @@ final class ExportController implements InvocableController
|
||||
&& in_array(Current::$charset, Encoding::listEncodings(), true);
|
||||
|
||||
// Use on the fly compression?
|
||||
Export::$onFlyCompression = $config->settings['CompressOnFly'] && Export::$compression === 'gzip';
|
||||
Export::$onFlyCompression = $this->config->settings['CompressOnFly'] && Export::$compression === 'gzip';
|
||||
if (Export::$onFlyCompression) {
|
||||
Export::$memoryLimit = $this->export->getMemoryLimit();
|
||||
}
|
||||
@ -240,7 +240,7 @@ final class ExportController implements InvocableController
|
||||
$filenameTemplate = $request->getParsedBodyParamAsString('filename_template');
|
||||
|
||||
if ((bool) $rememberTemplate) {
|
||||
$this->export->rememberFilename($config, $exportType, $filenameTemplate);
|
||||
$this->export->rememberFilename($this->config, $exportType, $filenameTemplate);
|
||||
}
|
||||
|
||||
$filename = $this->export->getFinalFilename(
|
||||
|
||||
@ -16,13 +16,14 @@ use PhpMyAdmin\Template;
|
||||
|
||||
use function is_array;
|
||||
|
||||
final class CreateController implements InvocableController
|
||||
final readonly class CreateController implements InvocableController
|
||||
{
|
||||
public function __construct(
|
||||
private readonly ResponseRenderer $response,
|
||||
private readonly Template $template,
|
||||
private readonly TemplateModel $model,
|
||||
private readonly Relation $relation,
|
||||
private ResponseRenderer $response,
|
||||
private Template $template,
|
||||
private TemplateModel $model,
|
||||
private Relation $relation,
|
||||
private Config $config,
|
||||
) {
|
||||
}
|
||||
|
||||
@ -39,7 +40,7 @@ final class CreateController implements InvocableController
|
||||
}
|
||||
|
||||
$template = ExportTemplate::fromArray([
|
||||
'username' => Config::getInstance()->selectedServer['user'],
|
||||
'username' => $this->config->selectedServer['user'],
|
||||
'exportType' => $exportType,
|
||||
'name' => $templateName,
|
||||
'data' => $templateData,
|
||||
|
||||
@ -12,12 +12,13 @@ use PhpMyAdmin\Http\Response;
|
||||
use PhpMyAdmin\Http\ServerRequest;
|
||||
use PhpMyAdmin\ResponseRenderer;
|
||||
|
||||
final class DeleteController implements InvocableController
|
||||
final readonly class DeleteController implements InvocableController
|
||||
{
|
||||
public function __construct(
|
||||
private readonly ResponseRenderer $response,
|
||||
private readonly TemplateModel $model,
|
||||
private readonly Relation $relation,
|
||||
private ResponseRenderer $response,
|
||||
private TemplateModel $model,
|
||||
private Relation $relation,
|
||||
private Config $config,
|
||||
) {
|
||||
}
|
||||
|
||||
@ -33,7 +34,7 @@ final class DeleteController implements InvocableController
|
||||
$result = $this->model->delete(
|
||||
$exportTemplatesFeature->database,
|
||||
$exportTemplatesFeature->exportTemplates,
|
||||
Config::getInstance()->selectedServer['user'],
|
||||
$this->config->selectedServer['user'],
|
||||
$templateId,
|
||||
);
|
||||
|
||||
|
||||
@ -13,12 +13,13 @@ use PhpMyAdmin\Http\Response;
|
||||
use PhpMyAdmin\Http\ServerRequest;
|
||||
use PhpMyAdmin\ResponseRenderer;
|
||||
|
||||
final class LoadController implements InvocableController
|
||||
final readonly class LoadController implements InvocableController
|
||||
{
|
||||
public function __construct(
|
||||
private readonly ResponseRenderer $response,
|
||||
private readonly TemplateModel $model,
|
||||
private readonly Relation $relation,
|
||||
private ResponseRenderer $response,
|
||||
private TemplateModel $model,
|
||||
private Relation $relation,
|
||||
private Config $config,
|
||||
) {
|
||||
}
|
||||
|
||||
@ -34,7 +35,7 @@ final class LoadController implements InvocableController
|
||||
$template = $this->model->load(
|
||||
$exportTemplatesFeature->database,
|
||||
$exportTemplatesFeature->exportTemplates,
|
||||
Config::getInstance()->selectedServer['user'],
|
||||
$this->config->selectedServer['user'],
|
||||
$templateId,
|
||||
);
|
||||
|
||||
|
||||
@ -13,12 +13,13 @@ use PhpMyAdmin\Http\Response;
|
||||
use PhpMyAdmin\Http\ServerRequest;
|
||||
use PhpMyAdmin\ResponseRenderer;
|
||||
|
||||
final class UpdateController implements InvocableController
|
||||
final readonly class UpdateController implements InvocableController
|
||||
{
|
||||
public function __construct(
|
||||
private readonly ResponseRenderer $response,
|
||||
private readonly TemplateModel $model,
|
||||
private readonly Relation $relation,
|
||||
private ResponseRenderer $response,
|
||||
private TemplateModel $model,
|
||||
private Relation $relation,
|
||||
private Config $config,
|
||||
) {
|
||||
}
|
||||
|
||||
@ -34,7 +35,7 @@ final class UpdateController implements InvocableController
|
||||
|
||||
$template = ExportTemplate::fromArray([
|
||||
'id' => $templateId,
|
||||
'username' => Config::getInstance()->selectedServer['user'],
|
||||
'username' => $this->config->selectedServer['user'],
|
||||
'data' => $templateData,
|
||||
]);
|
||||
$result = $this->model->update(
|
||||
|
||||
@ -100,15 +100,14 @@ final class HomeController implements InvocableController
|
||||
$syncFavoriteTables = RecentFavoriteTables::getInstance(TableType::Favorite)
|
||||
->getHtmlSyncFavoriteTables();
|
||||
|
||||
$config = Config::getInstance();
|
||||
$hasServer = Current::$server > 0 || count($config->settings['Servers']) > 1;
|
||||
$hasServer = Current::$server > 0 || count($this->config->settings['Servers']) > 1;
|
||||
if ($hasServer) {
|
||||
$hasServerSelection = $config->settings['ServerDefault'] == 0
|
||||
$hasServerSelection = $this->config->settings['ServerDefault'] == 0
|
||||
|| (
|
||||
$config->settings['NavigationDisplayServers']
|
||||
$this->config->settings['NavigationDisplayServers']
|
||||
&& (
|
||||
count($config->settings['Servers']) > 1
|
||||
|| (Current::$server === 0 && count($config->settings['Servers']) === 1)
|
||||
count($this->config->settings['Servers']) > 1
|
||||
|| (Current::$server === 0 && count($this->config->settings['Servers']) === 1)
|
||||
)
|
||||
);
|
||||
if ($hasServerSelection) {
|
||||
@ -116,8 +115,8 @@ final class HomeController implements InvocableController
|
||||
}
|
||||
|
||||
if (Current::$server > 0) {
|
||||
$charsets = Charsets::getCharsets($this->dbi, $config->selectedServer['DisableIS']);
|
||||
$collations = Charsets::getCollations($this->dbi, $config->selectedServer['DisableIS']);
|
||||
$charsets = Charsets::getCharsets($this->dbi, $this->config->selectedServer['DisableIS']);
|
||||
$collations = Charsets::getCollations($this->dbi, $this->config->selectedServer['DisableIS']);
|
||||
$charsetsList = [];
|
||||
foreach ($charsets as $charset) {
|
||||
$collationsList = [];
|
||||
@ -139,24 +138,24 @@ final class HomeController implements InvocableController
|
||||
}
|
||||
|
||||
$availableLanguages = [];
|
||||
if ($config->config->Lang === '' && $languageManager->hasChoice()) {
|
||||
if ($this->config->config->Lang === '' && $languageManager->hasChoice()) {
|
||||
$availableLanguages = $languageManager->sortedLanguages();
|
||||
}
|
||||
|
||||
$showServerInfo = $config->settings['ShowServerInfo'];
|
||||
$showServerInfo = $this->config->settings['ShowServerInfo'];
|
||||
$databaseServer = [];
|
||||
if (Current::$server > 0 && ($showServerInfo === true || $showServerInfo === 'database-server')) {
|
||||
$hostInfo = '';
|
||||
if (! empty($config->selectedServer['verbose'])) {
|
||||
$hostInfo .= $config->selectedServer['verbose'] . ' (';
|
||||
if (! empty($this->config->selectedServer['verbose'])) {
|
||||
$hostInfo .= $this->config->selectedServer['verbose'] . ' (';
|
||||
}
|
||||
|
||||
$hostInfo .= $this->dbi->getHostInfo();
|
||||
if (! empty($config->selectedServer['verbose'])) {
|
||||
if (! empty($this->config->selectedServer['verbose'])) {
|
||||
$hostInfo .= ')';
|
||||
}
|
||||
|
||||
$serverCharset = Charsets::getServerCharset($this->dbi, $config->selectedServer['DisableIS']);
|
||||
$serverCharset = Charsets::getServerCharset($this->dbi, $this->config->selectedServer['DisableIS']);
|
||||
$databaseServer = [
|
||||
'host' => $hostInfo,
|
||||
'type' => Util::getServerType(),
|
||||
@ -186,13 +185,16 @@ final class HomeController implements InvocableController
|
||||
$relation = new Relation($this->dbi);
|
||||
if (Current::$server > 0 && $relation->arePmadbTablesAllDisabled() === false) {
|
||||
$relationParameters = $relation->getRelationParameters();
|
||||
if (! $relationParameters->hasAllFeatures() && $config->settings['PmaNoRelation_DisableWarning'] == false) {
|
||||
if (
|
||||
! $relationParameters->hasAllFeatures()
|
||||
&& $this->config->settings['PmaNoRelation_DisableWarning'] == false
|
||||
) {
|
||||
$messageText = __(
|
||||
'The phpMyAdmin configuration storage is not completely '
|
||||
. 'configured, some extended features have been deactivated. '
|
||||
. '%sFind out why%s. ',
|
||||
);
|
||||
if ($config->settings['ZeroConf'] == true) {
|
||||
if ($this->config->settings['ZeroConf'] == true) {
|
||||
$messageText .= '<br>'
|
||||
. __('Or alternately go to \'Operations\' tab of any database to set it up there.');
|
||||
}
|
||||
@ -204,7 +206,7 @@ final class HomeController implements InvocableController
|
||||
);
|
||||
$messageInstance->addParamHtml('</a>');
|
||||
/* Show error if user has configured something, notice elsewhere */
|
||||
if (! empty($config->settings['Servers'][Current::$server]['pmadb'])) {
|
||||
if (! empty($this->config->settings['Servers'][Current::$server]['pmadb'])) {
|
||||
$messageInstance->setType(MessageType::Error);
|
||||
}
|
||||
|
||||
@ -225,20 +227,20 @@ final class HomeController implements InvocableController
|
||||
'server' => Current::$server,
|
||||
'sync_favorite_tables' => $syncFavoriteTables,
|
||||
'has_server' => $hasServer,
|
||||
'is_demo' => $config->config->debug->demo,
|
||||
'is_demo' => $this->config->config->debug->demo,
|
||||
'has_server_selection' => $hasServerSelection ?? false,
|
||||
'server_selection' => $serverSelection ?? '',
|
||||
'has_change_password_link' => ($config->selectedServer['auth_type'] ?? '') !== 'config'
|
||||
&& $config->settings['ShowChgPassword'],
|
||||
'has_change_password_link' => ($this->config->selectedServer['auth_type'] ?? '') !== 'config'
|
||||
&& $this->config->settings['ShowChgPassword'],
|
||||
'charsets' => $charsetsList ?? [],
|
||||
'available_languages' => $availableLanguages,
|
||||
'database_server' => $databaseServer,
|
||||
'web_server' => $webServer,
|
||||
'show_php_info' => $config->settings['ShowPhpInfo'],
|
||||
'is_version_checked' => $config->settings['VersionCheck'],
|
||||
'show_php_info' => $this->config->settings['ShowPhpInfo'],
|
||||
'is_version_checked' => $this->config->settings['VersionCheck'],
|
||||
'phpmyadmin_major_version' => Version::SERIES,
|
||||
'config_storage_message' => $configStorageMessage ?? '',
|
||||
'has_theme_manager' => $config->settings['ThemeManager'],
|
||||
'has_theme_manager' => $this->config->settings['ThemeManager'],
|
||||
'themes' => $this->themeManager->getThemesArray(),
|
||||
'errors' => $this->errors,
|
||||
]);
|
||||
@ -250,13 +252,12 @@ final class HomeController implements InvocableController
|
||||
{
|
||||
$this->checkPhpExtensionsRequirements();
|
||||
|
||||
$config = Config::getInstance();
|
||||
if ($config->settings['LoginCookieValidityDisableWarning'] == false) {
|
||||
if ($this->config->settings['LoginCookieValidityDisableWarning'] == false) {
|
||||
/**
|
||||
* Check whether session.gc_maxlifetime limits session validity.
|
||||
*/
|
||||
$gcTime = (int) ini_get('session.gc_maxlifetime');
|
||||
if ($gcTime < $config->settings['LoginCookieValidity']) {
|
||||
if ($gcTime < $this->config->settings['LoginCookieValidity']) {
|
||||
$this->errors[] = [
|
||||
'message' => __(
|
||||
'Your PHP parameter [a@https://www.php.net/manual/en/session.' .
|
||||
@ -274,8 +275,8 @@ final class HomeController implements InvocableController
|
||||
* Check whether LoginCookieValidity is limited by LoginCookieStore.
|
||||
*/
|
||||
if (
|
||||
$config->settings['LoginCookieStore'] != 0
|
||||
&& $config->settings['LoginCookieStore'] < $config->settings['LoginCookieValidity']
|
||||
$this->config->settings['LoginCookieStore'] != 0
|
||||
&& $this->config->settings['LoginCookieStore'] < $this->config->settings['LoginCookieValidity']
|
||||
) {
|
||||
$this->errors[] = [
|
||||
'message' => __(
|
||||
@ -291,10 +292,10 @@ final class HomeController implements InvocableController
|
||||
* Warning if using the default MySQL controluser account
|
||||
*/
|
||||
if (
|
||||
isset($config->selectedServer['controluser'], $config->selectedServer['controlpass'])
|
||||
isset($this->config->selectedServer['controluser'], $this->config->selectedServer['controlpass'])
|
||||
&& Current::$server > 0
|
||||
&& $config->selectedServer['controluser'] === 'pma'
|
||||
&& $config->selectedServer['controlpass'] === 'pmapass'
|
||||
&& $this->config->selectedServer['controluser'] === 'pma'
|
||||
&& $this->config->selectedServer['controlpass'] === 'pmapass'
|
||||
) {
|
||||
$this->errors[] = [
|
||||
'message' => __(
|
||||
@ -312,7 +313,7 @@ final class HomeController implements InvocableController
|
||||
*/
|
||||
if (! empty($_SESSION['encryption_key'])) {
|
||||
// This can happen if the user did use getenv() to set blowfish_secret
|
||||
$encryptionKeyLength = mb_strlen($config->settings['blowfish_secret'], '8bit');
|
||||
$encryptionKeyLength = mb_strlen($this->config->settings['blowfish_secret'], '8bit');
|
||||
|
||||
if ($encryptionKeyLength < SODIUM_CRYPTO_SECRETBOX_KEYBYTES) {
|
||||
$this->errors[] = [
|
||||
@ -359,7 +360,7 @@ final class HomeController implements InvocableController
|
||||
* Warning about Suhosin only if its simulation mode is not enabled
|
||||
*/
|
||||
if (
|
||||
$config->settings['SuhosinDisableWarning'] == false
|
||||
$this->config->settings['SuhosinDisableWarning'] == false
|
||||
&& ini_get('suhosin.request.max_value_length')
|
||||
&& ini_get('suhosin.simulation') == '0'
|
||||
) {
|
||||
@ -404,13 +405,12 @@ final class HomeController implements InvocableController
|
||||
return;
|
||||
}
|
||||
|
||||
$config = Config::getInstance();
|
||||
/** @psalm-suppress MissingFile */
|
||||
$languageStats = include ROOT_PATH . 'app/language_stats.inc.php';
|
||||
if (
|
||||
! is_array($languageStats)
|
||||
|| ! isset($languageStats[Current::$lang])
|
||||
|| $languageStats[Current::$lang] >= $config->settings['TranslationWarningThreshold']
|
||||
|| $languageStats[Current::$lang] >= $this->config->settings['TranslationWarningThreshold']
|
||||
) {
|
||||
return;
|
||||
}
|
||||
|
||||
@ -49,14 +49,15 @@ use function preg_quote;
|
||||
use function preg_replace;
|
||||
use function time;
|
||||
|
||||
final class ImportController implements InvocableController
|
||||
final readonly class ImportController implements InvocableController
|
||||
{
|
||||
public function __construct(
|
||||
private readonly ResponseRenderer $response,
|
||||
private readonly Import $import,
|
||||
private readonly Sql $sql,
|
||||
private readonly DatabaseInterface $dbi,
|
||||
private readonly BookmarkRepository $bookmarkRepository,
|
||||
private ResponseRenderer $response,
|
||||
private Import $import,
|
||||
private Sql $sql,
|
||||
private DatabaseInterface $dbi,
|
||||
private BookmarkRepository $bookmarkRepository,
|
||||
private Config $config,
|
||||
) {
|
||||
}
|
||||
|
||||
@ -221,9 +222,8 @@ final class ImportController implements InvocableController
|
||||
}
|
||||
|
||||
Util::setTimeLimit();
|
||||
$config = Config::getInstance();
|
||||
if (! empty($config->settings['MemoryLimit'])) {
|
||||
ini_set('memory_limit', $config->settings['MemoryLimit']);
|
||||
if (! empty($this->config->settings['MemoryLimit'])) {
|
||||
ini_set('memory_limit', $this->config->settings['MemoryLimit']);
|
||||
}
|
||||
|
||||
ImportSettings::$timestamp = time();
|
||||
@ -258,7 +258,7 @@ final class ImportController implements InvocableController
|
||||
switch ($actionBookmark) {
|
||||
case 0: // bookmarked query that have to be run
|
||||
$bookmark = $this->bookmarkRepository->get(
|
||||
$request->hasBodyParam('action_bookmark_all') ? null : $config->selectedServer['user'],
|
||||
$request->hasBodyParam('action_bookmark_all') ? null : $this->config->selectedServer['user'],
|
||||
$idBookmark,
|
||||
);
|
||||
if (! $bookmark instanceof Bookmark) {
|
||||
@ -287,7 +287,7 @@ final class ImportController implements InvocableController
|
||||
|
||||
break;
|
||||
case 1: // bookmarked query that have to be displayed
|
||||
$bookmark = $this->bookmarkRepository->get($config->selectedServer['user'], $idBookmark);
|
||||
$bookmark = $this->bookmarkRepository->get($this->config->selectedServer['user'], $idBookmark);
|
||||
if (! $bookmark instanceof Bookmark) {
|
||||
break;
|
||||
}
|
||||
@ -306,7 +306,7 @@ final class ImportController implements InvocableController
|
||||
ImportSettings::$runQuery = false;
|
||||
break;
|
||||
case 2: // bookmarked query that have to be deleted
|
||||
$bookmark = $this->bookmarkRepository->get($config->selectedServer['user'], $idBookmark);
|
||||
$bookmark = $this->bookmarkRepository->get($this->config->selectedServer['user'], $idBookmark);
|
||||
if (! $bookmark instanceof Bookmark) {
|
||||
break;
|
||||
}
|
||||
@ -365,11 +365,11 @@ final class ImportController implements InvocableController
|
||||
ImportSettings::$importFileName = $_FILES['import_file']['name'];
|
||||
}
|
||||
|
||||
if (ImportSettings::$localImportFile !== '' && $config->settings['UploadDir'] !== '') {
|
||||
if (ImportSettings::$localImportFile !== '' && $this->config->settings['UploadDir'] !== '') {
|
||||
// sanitize $local_import_file as it comes from a POST
|
||||
ImportSettings::$localImportFile = Core::securePath(ImportSettings::$localImportFile);
|
||||
|
||||
ImportSettings::$importFile = Util::userDir($config->settings['UploadDir'])
|
||||
ImportSettings::$importFile = Util::userDir($this->config->settings['UploadDir'])
|
||||
. ImportSettings::$localImportFile;
|
||||
|
||||
/**
|
||||
@ -582,7 +582,7 @@ final class ImportController implements InvocableController
|
||||
// (but if the query is too large, in case of an imported file, the parser
|
||||
// can choke on it so avoid parsing)
|
||||
$sqlLength = mb_strlen(Current::$sqlQuery);
|
||||
if ($sqlLength <= $config->settings['MaxCharactersInDisplayedSQL']) {
|
||||
if ($sqlLength <= $this->config->settings['MaxCharactersInDisplayedSQL']) {
|
||||
[$statementInfo, Current::$database, $tableFromSql] = ParseAnalyze::sqlQuery(
|
||||
Current::$sqlQuery,
|
||||
Current::$database,
|
||||
@ -621,7 +621,7 @@ final class ImportController implements InvocableController
|
||||
if (
|
||||
$this->sql->hasNoRightsToDropDatabase(
|
||||
$statementInfo,
|
||||
$config->settings['AllowUserDropDatabase'],
|
||||
$this->config->settings['AllowUserDropDatabase'],
|
||||
$this->dbi->isSuperUser(),
|
||||
)
|
||||
) {
|
||||
@ -658,7 +658,7 @@ final class ImportController implements InvocableController
|
||||
if (! empty($request->getParsedBodyParam('bkm_label')) && Import::$importText !== '') {
|
||||
$this->sql->storeTheQueryAsBookmark(
|
||||
Current::$database,
|
||||
$config->selectedServer['user'],
|
||||
$this->config->selectedServer['user'],
|
||||
$request->getParsedBodyParamAsString('sql_query'),
|
||||
$request->getParsedBodyParamAsString('bkm_label'),
|
||||
$request->hasBodyParam('bkm_replace'),
|
||||
@ -685,7 +685,7 @@ final class ImportController implements InvocableController
|
||||
|
||||
$this->sql->storeTheQueryAsBookmark(
|
||||
Current::$database,
|
||||
$config->selectedServer['user'],
|
||||
$this->config->selectedServer['user'],
|
||||
$request->getParsedBodyParamAsString('sql_query'),
|
||||
$request->getParsedBodyParamAsString('bkm_label'),
|
||||
$request->hasBodyParam('bkm_replace'),
|
||||
|
||||
@ -36,16 +36,17 @@ use function mb_strtolower;
|
||||
/**
|
||||
* Handles miscellaneous database operations.
|
||||
*/
|
||||
final class DatabaseController implements InvocableController
|
||||
final readonly class DatabaseController implements InvocableController
|
||||
{
|
||||
public function __construct(
|
||||
private readonly ResponseRenderer $response,
|
||||
private readonly Operations $operations,
|
||||
private readonly UserPrivilegesFactory $userPrivilegesFactory,
|
||||
private readonly Relation $relation,
|
||||
private readonly RelationCleanup $relationCleanup,
|
||||
private readonly DatabaseInterface $dbi,
|
||||
private readonly DbTableExists $dbTableExists,
|
||||
private ResponseRenderer $response,
|
||||
private Operations $operations,
|
||||
private UserPrivilegesFactory $userPrivilegesFactory,
|
||||
private Relation $relation,
|
||||
private RelationCleanup $relationCleanup,
|
||||
private DatabaseInterface $dbi,
|
||||
private DbTableExists $dbTableExists,
|
||||
private Config $config,
|
||||
) {
|
||||
}
|
||||
|
||||
@ -224,8 +225,6 @@ final class DatabaseController implements InvocableController
|
||||
return $this->response->missingParameterError('db');
|
||||
}
|
||||
|
||||
$config = Config::getInstance();
|
||||
|
||||
$databaseName = DatabaseName::tryFrom($request->getParam('db'));
|
||||
if ($databaseName === null || ! $this->dbTableExists->selectDatabase($databaseName)) {
|
||||
if ($request->isAjax()) {
|
||||
@ -262,15 +261,17 @@ final class DatabaseController implements InvocableController
|
||||
$hasAdjustPrivileges = $userPrivileges->database && $userPrivileges->table
|
||||
&& $userPrivileges->column && $userPrivileges->routines && $userPrivileges->isReload;
|
||||
|
||||
$isDropDatabaseAllowed = ($this->dbi->isSuperUser() || $config->settings['AllowUserDropDatabase'])
|
||||
$isDropDatabaseAllowed = ($this->dbi->isSuperUser() || $this->config->settings['AllowUserDropDatabase'])
|
||||
&& Current::$database !== 'mysql';
|
||||
|
||||
$switchToNew = isset($_SESSION['pma_switch_to_new']) && $_SESSION['pma_switch_to_new'];
|
||||
|
||||
$charsets = Charsets::getCharsets($this->dbi, $config->selectedServer['DisableIS']);
|
||||
$collations = Charsets::getCollations($this->dbi, $config->selectedServer['DisableIS']);
|
||||
$charsets = Charsets::getCharsets($this->dbi, $this->config->selectedServer['DisableIS']);
|
||||
$collations = Charsets::getCollations($this->dbi, $this->config->selectedServer['DisableIS']);
|
||||
|
||||
if (! $relationParameters->hasAllFeatures() && $config->settings['PmaNoRelation_DisableWarning'] == false) {
|
||||
if (
|
||||
! $relationParameters->hasAllFeatures() && $this->config->settings['PmaNoRelation_DisableWarning'] == false
|
||||
) {
|
||||
Current::$message = Message::notice(
|
||||
__(
|
||||
'The phpMyAdmin configuration storage has been deactivated. %sFind out why%s.',
|
||||
@ -282,7 +283,7 @@ final class DatabaseController implements InvocableController
|
||||
);
|
||||
Current::$message->addParamHtml('</a>');
|
||||
/* Show error if user has configured something, notice elsewhere */
|
||||
if (! empty($config->settings['Servers'][Current::$server]['pmadb'])) {
|
||||
if (! empty($this->config->settings['Servers'][Current::$server]['pmadb'])) {
|
||||
Current::$message->setType(MessageType::Error);
|
||||
}
|
||||
}
|
||||
|
||||
@ -41,15 +41,16 @@ use function preg_replace;
|
||||
use function str_contains;
|
||||
use function urldecode;
|
||||
|
||||
final class TableController implements InvocableController
|
||||
final readonly class TableController implements InvocableController
|
||||
{
|
||||
public function __construct(
|
||||
private readonly ResponseRenderer $response,
|
||||
private readonly Operations $operations,
|
||||
private readonly UserPrivilegesFactory $userPrivilegesFactory,
|
||||
private readonly Relation $relation,
|
||||
private readonly DatabaseInterface $dbi,
|
||||
private readonly DbTableExists $dbTableExists,
|
||||
private ResponseRenderer $response,
|
||||
private Operations $operations,
|
||||
private UserPrivilegesFactory $userPrivilegesFactory,
|
||||
private Relation $relation,
|
||||
private DatabaseInterface $dbi,
|
||||
private DbTableExists $dbTableExists,
|
||||
private Config $config,
|
||||
) {
|
||||
}
|
||||
|
||||
@ -75,7 +76,6 @@ final class TableController implements InvocableController
|
||||
|
||||
$isSystemSchema = Utilities::isSystemSchema(Current::$database);
|
||||
UrlParams::$params = ['db' => Current::$database, 'table' => Current::$table];
|
||||
$config = Config::getInstance();
|
||||
|
||||
$databaseName = DatabaseName::tryFrom($request->getParam('db'));
|
||||
if ($databaseName === null || ! $this->dbTableExists->selectDatabase($databaseName)) {
|
||||
@ -438,8 +438,8 @@ final class TableController implements InvocableController
|
||||
|
||||
$storageEngines = StorageEngine::getArray();
|
||||
|
||||
$charsets = Charsets::getCharsets($this->dbi, $config->selectedServer['DisableIS']);
|
||||
$collations = Charsets::getCollations($this->dbi, $config->selectedServer['DisableIS']);
|
||||
$charsets = Charsets::getCharsets($this->dbi, $this->config->selectedServer['DisableIS']);
|
||||
$collations = Charsets::getCollations($this->dbi, $this->config->selectedServer['DisableIS']);
|
||||
|
||||
$hasPackKeys = isset($createOptions['pack_keys'])
|
||||
&& $pmaTable->isEngine(['MYISAM', 'ARIA', 'ISAM']);
|
||||
@ -452,7 +452,7 @@ final class TableController implements InvocableController
|
||||
|
||||
$databaseList = [];
|
||||
$listDatabase = $this->dbi->getDatabaseList();
|
||||
if (count($listDatabase) <= $config->settings['MaxDbList']) {
|
||||
if (count($listDatabase) <= $this->config->settings['MaxDbList']) {
|
||||
$databaseList = $listDatabase->getList();
|
||||
}
|
||||
|
||||
|
||||
@ -22,14 +22,14 @@ use PhpMyAdmin\UserPreferences;
|
||||
use function define;
|
||||
use function ltrim;
|
||||
|
||||
final class ExportController implements InvocableController
|
||||
final readonly class ExportController implements InvocableController
|
||||
{
|
||||
public function __construct(
|
||||
private readonly ResponseRenderer $response,
|
||||
private readonly UserPreferences $userPreferences,
|
||||
private readonly Relation $relation,
|
||||
private readonly Config $config,
|
||||
private readonly ThemeManager $themeManager,
|
||||
private ResponseRenderer $response,
|
||||
private UserPreferences $userPreferences,
|
||||
private Relation $relation,
|
||||
private Config $config,
|
||||
private ThemeManager $themeManager,
|
||||
) {
|
||||
}
|
||||
|
||||
@ -51,7 +51,7 @@ final class ExportController implements InvocableController
|
||||
$result = null;
|
||||
if ($formDisplay->process(false) && ! $formDisplay->hasErrors()) {
|
||||
// Load 2FA settings
|
||||
$twoFactor = new TwoFactor(Config::getInstance()->selectedServer['user']);
|
||||
$twoFactor = new TwoFactor($this->config->selectedServer['user']);
|
||||
// save settings
|
||||
$result = $this->userPreferences->save($configFile->getConfigArray());
|
||||
// save back the 2FA setting only
|
||||
|
||||
@ -22,14 +22,14 @@ use PhpMyAdmin\UserPreferences;
|
||||
use function define;
|
||||
use function ltrim;
|
||||
|
||||
final class FeaturesController implements InvocableController
|
||||
final readonly class FeaturesController implements InvocableController
|
||||
{
|
||||
public function __construct(
|
||||
private readonly ResponseRenderer $response,
|
||||
private readonly UserPreferences $userPreferences,
|
||||
private readonly Relation $relation,
|
||||
private readonly Config $config,
|
||||
private readonly ThemeManager $themeManager,
|
||||
private ResponseRenderer $response,
|
||||
private UserPreferences $userPreferences,
|
||||
private Relation $relation,
|
||||
private Config $config,
|
||||
private ThemeManager $themeManager,
|
||||
) {
|
||||
}
|
||||
|
||||
@ -51,7 +51,7 @@ final class FeaturesController implements InvocableController
|
||||
$result = null;
|
||||
if ($formDisplay->process(false) && ! $formDisplay->hasErrors()) {
|
||||
// Load 2FA settings
|
||||
$twoFactor = new TwoFactor(Config::getInstance()->selectedServer['user']);
|
||||
$twoFactor = new TwoFactor($this->config->selectedServer['user']);
|
||||
// save settings
|
||||
$result = $this->userPreferences->save($configFile->getConfigArray());
|
||||
// save back the 2FA setting only
|
||||
|
||||
@ -22,14 +22,14 @@ use PhpMyAdmin\UserPreferences;
|
||||
use function define;
|
||||
use function ltrim;
|
||||
|
||||
final class ImportController implements InvocableController
|
||||
final readonly class ImportController implements InvocableController
|
||||
{
|
||||
public function __construct(
|
||||
private readonly ResponseRenderer $response,
|
||||
private readonly UserPreferences $userPreferences,
|
||||
private readonly Relation $relation,
|
||||
private readonly Config $config,
|
||||
private readonly ThemeManager $themeManager,
|
||||
private ResponseRenderer $response,
|
||||
private UserPreferences $userPreferences,
|
||||
private Relation $relation,
|
||||
private Config $config,
|
||||
private ThemeManager $themeManager,
|
||||
) {
|
||||
}
|
||||
|
||||
@ -51,7 +51,7 @@ final class ImportController implements InvocableController
|
||||
$result = null;
|
||||
if ($formDisplay->process(false) && ! $formDisplay->hasErrors()) {
|
||||
// Load 2FA settings
|
||||
$twoFactor = new TwoFactor(Config::getInstance()->selectedServer['user']);
|
||||
$twoFactor = new TwoFactor($this->config->selectedServer['user']);
|
||||
// save settings
|
||||
$result = $this->userPreferences->save($configFile->getConfigArray());
|
||||
// save back the 2FA setting only
|
||||
|
||||
@ -22,14 +22,14 @@ use PhpMyAdmin\UserPreferences;
|
||||
use function define;
|
||||
use function ltrim;
|
||||
|
||||
final class MainPanelController implements InvocableController
|
||||
final readonly class MainPanelController implements InvocableController
|
||||
{
|
||||
public function __construct(
|
||||
private readonly ResponseRenderer $response,
|
||||
private readonly UserPreferences $userPreferences,
|
||||
private readonly Relation $relation,
|
||||
private readonly Config $config,
|
||||
private readonly ThemeManager $themeManager,
|
||||
private ResponseRenderer $response,
|
||||
private UserPreferences $userPreferences,
|
||||
private Relation $relation,
|
||||
private Config $config,
|
||||
private ThemeManager $themeManager,
|
||||
) {
|
||||
}
|
||||
|
||||
@ -51,7 +51,7 @@ final class MainPanelController implements InvocableController
|
||||
$result = null;
|
||||
if ($formDisplay->process(false) && ! $formDisplay->hasErrors()) {
|
||||
// Load 2FA settings
|
||||
$twoFactor = new TwoFactor(Config::getInstance()->selectedServer['user']);
|
||||
$twoFactor = new TwoFactor($this->config->selectedServer['user']);
|
||||
// save settings
|
||||
$result = $this->userPreferences->save($configFile->getConfigArray());
|
||||
// save back the 2FA setting only
|
||||
|
||||
@ -22,14 +22,14 @@ use PhpMyAdmin\UserPreferences;
|
||||
use function define;
|
||||
use function ltrim;
|
||||
|
||||
final class NavigationController implements InvocableController
|
||||
final readonly class NavigationController implements InvocableController
|
||||
{
|
||||
public function __construct(
|
||||
private readonly ResponseRenderer $response,
|
||||
private readonly UserPreferences $userPreferences,
|
||||
private readonly Relation $relation,
|
||||
private readonly Config $config,
|
||||
private readonly ThemeManager $themeManager,
|
||||
private ResponseRenderer $response,
|
||||
private UserPreferences $userPreferences,
|
||||
private Relation $relation,
|
||||
private Config $config,
|
||||
private ThemeManager $themeManager,
|
||||
) {
|
||||
}
|
||||
|
||||
@ -51,7 +51,7 @@ final class NavigationController implements InvocableController
|
||||
$result = null;
|
||||
if ($formDisplay->process(false) && ! $formDisplay->hasErrors()) {
|
||||
// Load 2FA settings
|
||||
$twoFactor = new TwoFactor(Config::getInstance()->selectedServer['user']);
|
||||
$twoFactor = new TwoFactor($this->config->selectedServer['user']);
|
||||
// save settings
|
||||
$result = $this->userPreferences->save($configFile->getConfigArray());
|
||||
// save back the 2FA setting only
|
||||
|
||||
@ -22,14 +22,14 @@ use PhpMyAdmin\UserPreferences;
|
||||
use function define;
|
||||
use function ltrim;
|
||||
|
||||
final class SqlController implements InvocableController
|
||||
final readonly class SqlController implements InvocableController
|
||||
{
|
||||
public function __construct(
|
||||
private readonly ResponseRenderer $response,
|
||||
private readonly UserPreferences $userPreferences,
|
||||
private readonly Relation $relation,
|
||||
private readonly Config $config,
|
||||
private readonly ThemeManager $themeManager,
|
||||
private ResponseRenderer $response,
|
||||
private UserPreferences $userPreferences,
|
||||
private Relation $relation,
|
||||
private Config $config,
|
||||
private ThemeManager $themeManager,
|
||||
) {
|
||||
}
|
||||
|
||||
@ -51,7 +51,7 @@ final class SqlController implements InvocableController
|
||||
$result = null;
|
||||
if ($formDisplay->process(false) && ! $formDisplay->hasErrors()) {
|
||||
// Load 2FA settings
|
||||
$twoFactor = new TwoFactor(Config::getInstance()->selectedServer['user']);
|
||||
$twoFactor = new TwoFactor($this->config->selectedServer['user']);
|
||||
// save settings
|
||||
$result = $this->userPreferences->save($configFile->getConfigArray());
|
||||
// save back the 2FA setting only
|
||||
|
||||
@ -17,9 +17,9 @@ use function __;
|
||||
use function count;
|
||||
use function define;
|
||||
|
||||
final class TwoFactorController implements InvocableController
|
||||
final readonly class TwoFactorController implements InvocableController
|
||||
{
|
||||
public function __construct(private readonly ResponseRenderer $response, private readonly Relation $relation)
|
||||
public function __construct(private ResponseRenderer $response, private Relation $relation, private Config $config)
|
||||
{
|
||||
}
|
||||
|
||||
@ -33,7 +33,7 @@ final class TwoFactorController implements InvocableController
|
||||
'has_config_storage' => $relationParameters->userPreferencesFeature !== null,
|
||||
]);
|
||||
|
||||
$twoFactor = new TwoFactor(Config::getInstance()->selectedServer['user']);
|
||||
$twoFactor = new TwoFactor($this->config->selectedServer['user']);
|
||||
|
||||
if ($request->hasBodyParam('2fa_remove')) {
|
||||
if (! $twoFactor->check($request, true)) {
|
||||
|
||||
@ -28,8 +28,11 @@ final class BinlogController implements InvocableController
|
||||
*/
|
||||
private array $binaryLogs;
|
||||
|
||||
public function __construct(private readonly ResponseRenderer $response, private readonly DatabaseInterface $dbi)
|
||||
{
|
||||
public function __construct(
|
||||
private readonly ResponseRenderer $response,
|
||||
private readonly DatabaseInterface $dbi,
|
||||
private readonly Config $config,
|
||||
) {
|
||||
$this->binaryLogs = $this->dbi->fetchResult('SHOW BINARY LOGS', 'Log_name');
|
||||
}
|
||||
|
||||
@ -53,8 +56,7 @@ final class BinlogController implements InvocableController
|
||||
$urlParams['is_full_query'] = 1;
|
||||
}
|
||||
|
||||
$config = Config::getInstance();
|
||||
$sqlQuery = $this->getSqlQuery($log, $position, $config->settings['MaxRows']);
|
||||
$sqlQuery = $this->getSqlQuery($log, $position, $this->config->settings['MaxRows']);
|
||||
$result = $this->dbi->query($sqlQuery);
|
||||
|
||||
$numRows = $result->numRows();
|
||||
@ -64,8 +66,8 @@ final class BinlogController implements InvocableController
|
||||
$nextParams = $urlParams;
|
||||
if ($position > 0) {
|
||||
$fullQueriesParams['pos'] = $position;
|
||||
if ($position > $config->settings['MaxRows']) {
|
||||
$previousParams['pos'] = $position - $config->settings['MaxRows'];
|
||||
if ($position > $this->config->settings['MaxRows']) {
|
||||
$previousParams['pos'] = $position - $this->config->settings['MaxRows'];
|
||||
}
|
||||
}
|
||||
|
||||
@ -74,8 +76,8 @@ final class BinlogController implements InvocableController
|
||||
unset($fullQueriesParams['is_full_query']);
|
||||
}
|
||||
|
||||
if ($numRows >= $config->settings['MaxRows']) {
|
||||
$nextParams['pos'] = $position + $config->settings['MaxRows'];
|
||||
if ($numRows >= $this->config->settings['MaxRows']) {
|
||||
$nextParams['pos'] = $position + $this->config->settings['MaxRows'];
|
||||
}
|
||||
|
||||
$values = $result->fetchAllAssoc();
|
||||
@ -87,7 +89,7 @@ final class BinlogController implements InvocableController
|
||||
'sql_message' => Generator::getMessage(Message::success(), $sqlQuery),
|
||||
'values' => $values,
|
||||
'has_previous' => $position > 0,
|
||||
'has_next' => $numRows >= $config->settings['MaxRows'],
|
||||
'has_next' => $numRows >= $this->config->settings['MaxRows'],
|
||||
'previous_params' => $previousParams,
|
||||
'full_queries_params' => $fullQueriesParams,
|
||||
'next_params' => $nextParams,
|
||||
|
||||
@ -32,10 +32,10 @@ final class CollationsController implements InvocableController
|
||||
public function __construct(
|
||||
private readonly ResponseRenderer $response,
|
||||
private readonly DatabaseInterface $dbi,
|
||||
Config $config,
|
||||
array|null $charsets = null,
|
||||
array|null $collations = null,
|
||||
) {
|
||||
$config = Config::getInstance();
|
||||
$this->charsets = $charsets ?? Charsets::getCharsets($this->dbi, $config->selectedServer['DisableIS']);
|
||||
$this->collations = $collations ?? Charsets::getCollations($this->dbi, $config->selectedServer['DisableIS']);
|
||||
}
|
||||
|
||||
@ -25,10 +25,13 @@ use function is_string;
|
||||
use function mb_strtolower;
|
||||
use function str_contains;
|
||||
|
||||
final class CreateController implements InvocableController
|
||||
final readonly class CreateController implements InvocableController
|
||||
{
|
||||
public function __construct(private readonly ResponseRenderer $response, private readonly DatabaseInterface $dbi)
|
||||
{
|
||||
public function __construct(
|
||||
private ResponseRenderer $response,
|
||||
private DatabaseInterface $dbi,
|
||||
private Config $config,
|
||||
) {
|
||||
}
|
||||
|
||||
public function __invoke(ServerRequest $request): Response
|
||||
@ -50,11 +53,10 @@ final class CreateController implements InvocableController
|
||||
* Builds and executes the db creation sql query
|
||||
*/
|
||||
$sqlQuery = 'CREATE DATABASE ' . Util::backquote($newDb);
|
||||
$config = Config::getInstance();
|
||||
if (is_string($dbCollation) && $dbCollation !== '') {
|
||||
[$databaseCharset] = explode('_', $dbCollation);
|
||||
$charsets = Charsets::getCharsets($this->dbi, $config->selectedServer['DisableIS']);
|
||||
$collations = Charsets::getCollations($this->dbi, $config->selectedServer['DisableIS']);
|
||||
$charsets = Charsets::getCharsets($this->dbi, $this->config->selectedServer['DisableIS']);
|
||||
$collations = Charsets::getCollations($this->dbi, $this->config->selectedServer['DisableIS']);
|
||||
if (
|
||||
array_key_exists($databaseCharset, $charsets)
|
||||
&& array_key_exists($dbCollation, $collations[$databaseCharset])
|
||||
@ -82,7 +84,7 @@ final class CreateController implements InvocableController
|
||||
$message = Message::success(__('Database %1$s has been created.'));
|
||||
$message->addParam($newDb);
|
||||
|
||||
$scriptName = Url::getFromRoute($config->settings['DefaultTabDatabase']);
|
||||
$scriptName = Url::getFromRoute($this->config->settings['DefaultTabDatabase']);
|
||||
|
||||
$json = [
|
||||
'message' => $message,
|
||||
|
||||
@ -24,14 +24,15 @@ use function count;
|
||||
use function is_array;
|
||||
use function is_string;
|
||||
|
||||
final class DestroyController implements InvocableController
|
||||
final readonly class DestroyController implements InvocableController
|
||||
{
|
||||
public function __construct(
|
||||
private readonly ResponseRenderer $response,
|
||||
private readonly DatabaseInterface $dbi,
|
||||
private readonly Transformations $transformations,
|
||||
private readonly RelationCleanup $relationCleanup,
|
||||
private readonly UserPrivilegesFactory $userPrivilegesFactory,
|
||||
private ResponseRenderer $response,
|
||||
private DatabaseInterface $dbi,
|
||||
private Transformations $transformations,
|
||||
private RelationCleanup $relationCleanup,
|
||||
private UserPrivilegesFactory $userPrivilegesFactory,
|
||||
private Config $config,
|
||||
) {
|
||||
}
|
||||
|
||||
@ -39,10 +40,9 @@ final class DestroyController implements InvocableController
|
||||
{
|
||||
$userPrivileges = $this->userPrivilegesFactory->getPrivileges();
|
||||
|
||||
$config = Config::getInstance();
|
||||
if (
|
||||
! $request->isAjax()
|
||||
|| (! $this->dbi->isSuperUser() && ! $config->settings['AllowUserDropDatabase'])
|
||||
|| (! $this->dbi->isSuperUser() && ! $this->config->settings['AllowUserDropDatabase'])
|
||||
) {
|
||||
$message = Message::error();
|
||||
$json = ['message' => $message];
|
||||
@ -54,10 +54,11 @@ final class DestroyController implements InvocableController
|
||||
|
||||
$selectedDbs = $request->getParsedBodyParam('selected_dbs');
|
||||
$selectedDbs = is_array($selectedDbs) ? $selectedDbs : [];
|
||||
$selectedDbs = array_filter($selectedDbs, static function ($database) use ($config): bool {
|
||||
$pmadb = $this->config->selectedServer['pmadb'] ?? '';
|
||||
$selectedDbs = array_filter($selectedDbs, static function ($database) use ($pmadb): bool {
|
||||
return is_string($database)
|
||||
&& ! Utilities::isSystemSchema($database, true)
|
||||
&& $database !== ($config->selectedServer['pmadb'] ?? '');
|
||||
&& $database !== $pmadb;
|
||||
});
|
||||
|
||||
if ($selectedDbs === []) {
|
||||
|
||||
@ -61,6 +61,7 @@ final class DatabasesController implements InvocableController
|
||||
private readonly ResponseRenderer $response,
|
||||
private readonly DatabaseInterface $dbi,
|
||||
private readonly UserPrivilegesFactory $userPrivilegesFactory,
|
||||
private readonly Config $config,
|
||||
) {
|
||||
}
|
||||
|
||||
@ -117,10 +118,9 @@ final class DatabasesController implements InvocableController
|
||||
$databases = $this->getDatabases($primaryInfo, $replicaInfo);
|
||||
|
||||
$charsetsList = [];
|
||||
$config = Config::getInstance();
|
||||
if ($config->settings['ShowCreateDb'] && $userPrivileges->isCreateDatabase) {
|
||||
$charsets = Charsets::getCharsets($this->dbi, $config->selectedServer['DisableIS']);
|
||||
$collations = Charsets::getCollations($this->dbi, $config->selectedServer['DisableIS']);
|
||||
if ($this->config->settings['ShowCreateDb'] && $userPrivileges->isCreateDatabase) {
|
||||
$charsets = Charsets::getCharsets($this->dbi, $this->config->selectedServer['DisableIS']);
|
||||
$collations = Charsets::getCollations($this->dbi, $this->config->selectedServer['DisableIS']);
|
||||
$serverCollation = $this->dbi->getServerCollation();
|
||||
foreach ($charsets as $charset) {
|
||||
$collationsList = [];
|
||||
@ -143,7 +143,7 @@ final class DatabasesController implements InvocableController
|
||||
$headerStatistics = $this->getStatisticsColumns();
|
||||
|
||||
$this->response->render('server/databases/index', [
|
||||
'is_create_database_shown' => $config->settings['ShowCreateDb'],
|
||||
'is_create_database_shown' => $this->config->settings['ShowCreateDb'],
|
||||
'has_create_database_privileges' => $userPrivileges->isCreateDatabase,
|
||||
'has_statistics' => $this->hasStatistics,
|
||||
'database_to_create' => $userPrivileges->databaseToCreate,
|
||||
@ -154,10 +154,10 @@ final class DatabasesController implements InvocableController
|
||||
'database_count' => $this->databaseCount,
|
||||
'pos' => $position,
|
||||
'url_params' => $urlParams,
|
||||
'max_db_list' => $config->settings['MaxDbList'],
|
||||
'max_db_list' => $this->config->settings['MaxDbList'],
|
||||
'has_primary_replication' => $primaryInfo['status'],
|
||||
'has_replica_replication' => $replicaInfo['status'],
|
||||
'is_drop_allowed' => $this->dbi->isSuperUser() || $config->settings['AllowUserDropDatabase'],
|
||||
'is_drop_allowed' => $this->dbi->isSuperUser() || $this->config->settings['AllowUserDropDatabase'],
|
||||
]);
|
||||
|
||||
return $this->response->response();
|
||||
@ -213,8 +213,7 @@ final class DatabasesController implements InvocableController
|
||||
}
|
||||
}
|
||||
|
||||
$config = Config::getInstance();
|
||||
$url = Url::getFromRoute($config->settings['DefaultTabDatabase']);
|
||||
$url = Url::getFromRoute($this->config->settings['DefaultTabDatabase']);
|
||||
$url .= Url::getCommonRaw(
|
||||
['db' => $database['SCHEMA_NAME']],
|
||||
! str_contains($url, '?') ? '?' : '&',
|
||||
@ -225,12 +224,12 @@ final class DatabasesController implements InvocableController
|
||||
'statistics' => $statistics,
|
||||
'replication' => $replication,
|
||||
'is_system_schema' => Utilities::isSystemSchema($database['SCHEMA_NAME'], true),
|
||||
'is_pmadb' => $database['SCHEMA_NAME'] === ($config->selectedServer['pmadb'] ?? ''),
|
||||
'is_pmadb' => $database['SCHEMA_NAME'] === ($this->config->selectedServer['pmadb'] ?? ''),
|
||||
'url' => $url,
|
||||
];
|
||||
$collation = Charsets::findCollationByName(
|
||||
$this->dbi,
|
||||
$config->selectedServer['DisableIS'],
|
||||
$this->config->selectedServer['DisableIS'],
|
||||
$database['DEFAULT_COLLATION_NAME'],
|
||||
);
|
||||
if ($collation === null) {
|
||||
|
||||
@ -26,12 +26,13 @@ use function __;
|
||||
use function is_numeric;
|
||||
use function is_string;
|
||||
|
||||
final class ImportController implements InvocableController
|
||||
final readonly class ImportController implements InvocableController
|
||||
{
|
||||
public function __construct(
|
||||
private readonly ResponseRenderer $response,
|
||||
private readonly DatabaseInterface $dbi,
|
||||
private readonly PageSettings $pageSettings,
|
||||
private ResponseRenderer $response,
|
||||
private DatabaseInterface $dbi,
|
||||
private PageSettings $pageSettings,
|
||||
private Config $config,
|
||||
) {
|
||||
}
|
||||
|
||||
@ -69,8 +70,7 @@ final class ImportController implements InvocableController
|
||||
$localImportFile = $_REQUEST['local_import_file'] ?? null;
|
||||
$compressions = Import::getCompressions();
|
||||
|
||||
$config = Config::getInstance();
|
||||
$charsets = Charsets::getCharsets($this->dbi, $config->selectedServer['DisableIS']);
|
||||
$charsets = Charsets::getCharsets($this->dbi, $this->config->selectedServer['DisableIS']);
|
||||
|
||||
$idKey = $_SESSION[Ajax::SESSION_KEY]['handler']::getIdKey();
|
||||
$hiddenInputs = [$idKey => $uploadId, 'import_type' => 'server'];
|
||||
@ -96,19 +96,19 @@ final class ImportController implements InvocableController
|
||||
'skip_queries_default' => $skipQueriesDefault,
|
||||
'is_allow_interrupt_checked' => $isAllowInterruptChecked,
|
||||
'local_import_file' => $localImportFile,
|
||||
'is_upload' => $config->isUploadEnabled(),
|
||||
'upload_dir' => $config->settings['UploadDir'] ?? null,
|
||||
'is_upload' => $this->config->isUploadEnabled(),
|
||||
'upload_dir' => $this->config->settings['UploadDir'] ?? null,
|
||||
'timeout_passed_global' => ImportSettings::$timeoutPassed,
|
||||
'compressions' => $compressions,
|
||||
'is_encoding_supported' => Encoding::isSupported(),
|
||||
'encodings' => Encoding::listEncodings(),
|
||||
'import_charset' => $config->settings['Import']['charset'] ?? null,
|
||||
'import_charset' => $this->config->settings['Import']['charset'] ?? null,
|
||||
'timeout_passed' => $timeoutPassed,
|
||||
'offset' => $offset,
|
||||
'can_convert_kanji' => Encoding::canConvertKanji(),
|
||||
'charsets' => $charsets,
|
||||
'is_foreign_key_check' => ForeignKey::isCheckEnabled(),
|
||||
'user_upload_dir' => Util::userDir($config->settings['UploadDir'] ?? ''),
|
||||
'user_upload_dir' => Util::userDir($this->config->settings['UploadDir'] ?? ''),
|
||||
'local_files' => Import::getLocalFiles($importList),
|
||||
]);
|
||||
|
||||
@ -121,7 +121,7 @@ final class ImportController implements InvocableController
|
||||
return $formatParam;
|
||||
}
|
||||
|
||||
return Config::getInstance()->settings['Import']['format'];
|
||||
return $this->config->settings['Import']['format'];
|
||||
}
|
||||
|
||||
private function getSkipQueries(mixed $skipQueriesParam): int
|
||||
@ -130,6 +130,6 @@ final class ImportController implements InvocableController
|
||||
return (int) $skipQueriesParam;
|
||||
}
|
||||
|
||||
return Config::getInstance()->settings['Import']['skip_queries'];
|
||||
return $this->config->settings['Import']['skip_queries'];
|
||||
}
|
||||
}
|
||||
|
||||
@ -28,14 +28,15 @@ use function mb_strpos;
|
||||
use function str_contains;
|
||||
use function urlencode;
|
||||
|
||||
class SqlController implements InvocableController
|
||||
readonly class SqlController implements InvocableController
|
||||
{
|
||||
public function __construct(
|
||||
private readonly ResponseRenderer $response,
|
||||
private readonly Sql $sql,
|
||||
private readonly DatabaseInterface $dbi,
|
||||
private readonly PageSettings $pageSettings,
|
||||
private readonly BookmarkRepository $bookmarkRepository,
|
||||
private ResponseRenderer $response,
|
||||
private Sql $sql,
|
||||
private DatabaseInterface $dbi,
|
||||
private PageSettings $pageSettings,
|
||||
private BookmarkRepository $bookmarkRepository,
|
||||
private Config $config,
|
||||
) {
|
||||
}
|
||||
|
||||
@ -56,12 +57,11 @@ class SqlController implements InvocableController
|
||||
* Defines the url to return to in case of error in a sql statement
|
||||
*/
|
||||
$isGotofile = true;
|
||||
$config = Config::getInstance();
|
||||
if (UrlParams::$goto === '') {
|
||||
if (Current::$table === '') {
|
||||
UrlParams::$goto = Url::getFromRoute($config->settings['DefaultTabDatabase']);
|
||||
UrlParams::$goto = Url::getFromRoute($this->config->settings['DefaultTabDatabase']);
|
||||
} else {
|
||||
UrlParams::$goto = Url::getFromRoute($config->settings['DefaultTabTable']);
|
||||
UrlParams::$goto = Url::getFromRoute($this->config->settings['DefaultTabTable']);
|
||||
}
|
||||
}
|
||||
|
||||
@ -135,7 +135,7 @@ class SqlController implements InvocableController
|
||||
if (
|
||||
$this->sql->hasNoRightsToDropDatabase(
|
||||
$statementInfo,
|
||||
$config->settings['AllowUserDropDatabase'],
|
||||
$this->config->settings['AllowUserDropDatabase'],
|
||||
$this->dbi->isSuperUser(),
|
||||
)
|
||||
) {
|
||||
|
||||
@ -21,12 +21,10 @@ use function is_array;
|
||||
use function json_decode;
|
||||
use function json_encode;
|
||||
|
||||
final class SyncFavoriteTablesController implements InvocableController
|
||||
final readonly class SyncFavoriteTablesController implements InvocableController
|
||||
{
|
||||
public function __construct(
|
||||
private readonly ResponseRenderer $response,
|
||||
private readonly Relation $relation,
|
||||
) {
|
||||
public function __construct(private ResponseRenderer $response, private Relation $relation, private Config $config)
|
||||
{
|
||||
}
|
||||
|
||||
public function __invoke(ServerRequest $request): Response
|
||||
@ -43,7 +41,7 @@ final class SyncFavoriteTablesController implements InvocableController
|
||||
}
|
||||
|
||||
// Required to keep each user's preferences separate.
|
||||
$user = hash('sha1', Config::getInstance()->selectedServer['user']);
|
||||
$user = hash('sha1', $this->config->selectedServer['user']);
|
||||
|
||||
$relationParameters = $this->relation->getRelationParameters();
|
||||
if ($relationParameters->favoriteTablesFeature !== null) {
|
||||
|
||||
@ -32,12 +32,13 @@ use function min;
|
||||
/**
|
||||
* Handles creation of the chart.
|
||||
*/
|
||||
final class ChartController implements InvocableController
|
||||
final readonly class ChartController implements InvocableController
|
||||
{
|
||||
public function __construct(
|
||||
private readonly ResponseRenderer $response,
|
||||
private readonly DatabaseInterface $dbi,
|
||||
private readonly DbTableExists $dbTableExists,
|
||||
private ResponseRenderer $response,
|
||||
private DatabaseInterface $dbi,
|
||||
private DbTableExists $dbTableExists,
|
||||
private Config $config,
|
||||
) {
|
||||
}
|
||||
|
||||
@ -67,7 +68,6 @@ final class ChartController implements InvocableController
|
||||
|
||||
$urlParams = [];
|
||||
|
||||
$config = Config::getInstance();
|
||||
/**
|
||||
* Runs common work
|
||||
*/
|
||||
@ -106,11 +106,11 @@ final class ChartController implements InvocableController
|
||||
return $this->response->response();
|
||||
}
|
||||
|
||||
$urlParams['goto'] = Url::getFromRoute($config->settings['DefaultTabTable']);
|
||||
$urlParams['goto'] = Url::getFromRoute($this->config->settings['DefaultTabTable']);
|
||||
$urlParams['back'] = Url::getFromRoute('/table/sql');
|
||||
$this->dbi->selectDb(Current::$database);
|
||||
} elseif (Current::$database !== '') {
|
||||
$urlParams['goto'] = Url::getFromRoute($config->settings['DefaultTabDatabase']);
|
||||
$urlParams['goto'] = Url::getFromRoute($this->config->settings['DefaultTabDatabase']);
|
||||
$urlParams['back'] = Url::getFromRoute('/sql');
|
||||
|
||||
$databaseName = DatabaseName::tryFrom($request->getParam('db'));
|
||||
@ -127,7 +127,7 @@ final class ChartController implements InvocableController
|
||||
return $this->response->response();
|
||||
}
|
||||
} else {
|
||||
$urlParams['goto'] = Url::getFromRoute($config->settings['DefaultTabServer']);
|
||||
$urlParams['goto'] = Url::getFromRoute($this->config->settings['DefaultTabServer']);
|
||||
$urlParams['back'] = Url::getFromRoute('/sql');
|
||||
|
||||
if ($this->dbi->isSuperUser()) {
|
||||
|
||||
@ -24,12 +24,13 @@ use PhpMyAdmin\Utils\ForeignKey;
|
||||
use function __;
|
||||
use function sprintf;
|
||||
|
||||
final class DeleteRowsController implements InvocableController
|
||||
final readonly class DeleteRowsController implements InvocableController
|
||||
{
|
||||
public function __construct(
|
||||
private readonly ResponseRenderer $response,
|
||||
private readonly Template $template,
|
||||
private readonly DatabaseInterface $dbi,
|
||||
private ResponseRenderer $response,
|
||||
private Template $template,
|
||||
private DatabaseInterface $dbi,
|
||||
private Config $config,
|
||||
) {
|
||||
}
|
||||
|
||||
@ -46,7 +47,7 @@ final class DeleteRowsController implements InvocableController
|
||||
new Transformations(),
|
||||
$this->template,
|
||||
new BookmarkRepository($this->dbi, $relation),
|
||||
Config::getInstance(),
|
||||
$this->config,
|
||||
);
|
||||
|
||||
if ($multBtn === __('Yes')) {
|
||||
|
||||
@ -50,6 +50,7 @@ final class FindReplaceController implements InvocableController
|
||||
private readonly Template $template,
|
||||
private readonly DatabaseInterface $dbi,
|
||||
private readonly DbTableExists $dbTableExists,
|
||||
private readonly Config $config,
|
||||
) {
|
||||
}
|
||||
|
||||
@ -170,7 +171,7 @@ final class FindReplaceController implements InvocableController
|
||||
private function displaySelectionFormAction(): void
|
||||
{
|
||||
if (UrlParams::$goto === '') {
|
||||
UrlParams::$goto = Url::getFromRoute(Config::getInstance()->settings['DefaultTabTable']);
|
||||
UrlParams::$goto = Url::getFromRoute($this->config->settings['DefaultTabTable']);
|
||||
}
|
||||
|
||||
$types = [];
|
||||
|
||||
@ -35,14 +35,15 @@ use function ob_start;
|
||||
/**
|
||||
* Handles creation of the GIS visualizations.
|
||||
*/
|
||||
final class GisVisualizationController implements InvocableController
|
||||
final readonly class GisVisualizationController implements InvocableController
|
||||
{
|
||||
public function __construct(
|
||||
private readonly ResponseRenderer $response,
|
||||
private readonly Template $template,
|
||||
private readonly DatabaseInterface $dbi,
|
||||
private readonly DbTableExists $dbTableExists,
|
||||
private readonly ResponseFactory $responseFactory,
|
||||
private ResponseRenderer $response,
|
||||
private Template $template,
|
||||
private DatabaseInterface $dbi,
|
||||
private DbTableExists $dbTableExists,
|
||||
private ResponseFactory $responseFactory,
|
||||
private Config $config,
|
||||
) {
|
||||
}
|
||||
|
||||
@ -132,7 +133,7 @@ final class GisVisualizationController implements InvocableController
|
||||
* Displays the page
|
||||
*/
|
||||
$urlParams = UrlParams::$params;
|
||||
$urlParams['goto'] = Url::getFromRoute(Config::getInstance()->settings['DefaultTabDatabase']);
|
||||
$urlParams['goto'] = Url::getFromRoute($this->config->settings['DefaultTabDatabase']);
|
||||
$urlParams['back'] = Url::getFromRoute('/sql');
|
||||
$urlParams['sql_query'] = $sqlQuery;
|
||||
$urlParams['sql_signature'] = Core::signSqlQuery($sqlQuery);
|
||||
@ -236,7 +237,7 @@ final class GisVisualizationController implements InvocableController
|
||||
}
|
||||
|
||||
if ($_SESSION['tmpval']['max_rows'] === 'all') {
|
||||
return Config::getInstance()->settings['MaxRows'];
|
||||
return $this->config->settings['MaxRows'];
|
||||
}
|
||||
|
||||
return (int) $_SESSION['tmpval']['max_rows'];
|
||||
|
||||
@ -31,13 +31,14 @@ use function __;
|
||||
use function is_numeric;
|
||||
use function is_string;
|
||||
|
||||
final class ImportController implements InvocableController
|
||||
final readonly class ImportController implements InvocableController
|
||||
{
|
||||
public function __construct(
|
||||
private readonly ResponseRenderer $response,
|
||||
private readonly DatabaseInterface $dbi,
|
||||
private readonly PageSettings $pageSettings,
|
||||
private readonly DbTableExists $dbTableExists,
|
||||
private ResponseRenderer $response,
|
||||
private DatabaseInterface $dbi,
|
||||
private PageSettings $pageSettings,
|
||||
private DbTableExists $dbTableExists,
|
||||
private Config $config,
|
||||
) {
|
||||
}
|
||||
|
||||
@ -58,7 +59,6 @@ final class ImportController implements InvocableController
|
||||
}
|
||||
|
||||
UrlParams::$params = ['db' => Current::$database, 'table' => Current::$table];
|
||||
$config = Config::getInstance();
|
||||
|
||||
$databaseName = DatabaseName::tryFrom($request->getParam('db'));
|
||||
if ($databaseName === null || ! $this->dbTableExists->selectDatabase($databaseName)) {
|
||||
@ -113,7 +113,7 @@ final class ImportController implements InvocableController
|
||||
$localImportFile = $_REQUEST['local_import_file'] ?? null;
|
||||
$compressions = Import::getCompressions();
|
||||
|
||||
$charsets = Charsets::getCharsets($this->dbi, $config->selectedServer['DisableIS']);
|
||||
$charsets = Charsets::getCharsets($this->dbi, $this->config->selectedServer['DisableIS']);
|
||||
|
||||
$idKey = $_SESSION[Ajax::SESSION_KEY]['handler']::getIdKey();
|
||||
$hiddenInputs = [
|
||||
@ -144,19 +144,19 @@ final class ImportController implements InvocableController
|
||||
'skip_queries_default' => $skipQueriesDefault,
|
||||
'is_allow_interrupt_checked' => $isAllowInterruptChecked,
|
||||
'local_import_file' => $localImportFile,
|
||||
'is_upload' => $config->isUploadEnabled(),
|
||||
'upload_dir' => $config->settings['UploadDir'] ?? null,
|
||||
'is_upload' => $this->config->isUploadEnabled(),
|
||||
'upload_dir' => $this->config->settings['UploadDir'] ?? null,
|
||||
'timeout_passed_global' => ImportSettings::$timeoutPassed,
|
||||
'compressions' => $compressions,
|
||||
'is_encoding_supported' => Encoding::isSupported(),
|
||||
'encodings' => Encoding::listEncodings(),
|
||||
'import_charset' => $config->settings['Import']['charset'] ?? null,
|
||||
'import_charset' => $this->config->settings['Import']['charset'] ?? null,
|
||||
'timeout_passed' => $timeoutPassed,
|
||||
'offset' => $offset,
|
||||
'can_convert_kanji' => Encoding::canConvertKanji(),
|
||||
'charsets' => $charsets,
|
||||
'is_foreign_key_check' => ForeignKey::isCheckEnabled(),
|
||||
'user_upload_dir' => Util::userDir($config->settings['UploadDir'] ?? ''),
|
||||
'user_upload_dir' => Util::userDir($this->config->settings['UploadDir'] ?? ''),
|
||||
'local_files' => Import::getLocalFiles($importList),
|
||||
]);
|
||||
|
||||
@ -169,7 +169,7 @@ final class ImportController implements InvocableController
|
||||
return $formatParam;
|
||||
}
|
||||
|
||||
return Config::getInstance()->settings['Import']['format'];
|
||||
return $this->config->settings['Import']['format'];
|
||||
}
|
||||
|
||||
private function getSkipQueries(mixed $skipQueriesParam): int
|
||||
@ -178,6 +178,6 @@ final class ImportController implements InvocableController
|
||||
return (int) $skipQueriesParam;
|
||||
}
|
||||
|
||||
return Config::getInstance()->settings['Import']['skip_queries'];
|
||||
return $this->config->settings['Import']['skip_queries'];
|
||||
}
|
||||
}
|
||||
|
||||
@ -33,14 +33,15 @@ use function min;
|
||||
/**
|
||||
* Displays index edit/creation form and handles it.
|
||||
*/
|
||||
final class IndexesController implements InvocableController
|
||||
final readonly class IndexesController implements InvocableController
|
||||
{
|
||||
public function __construct(
|
||||
private readonly ResponseRenderer $response,
|
||||
private readonly Template $template,
|
||||
private readonly DatabaseInterface $dbi,
|
||||
private readonly Indexes $indexes,
|
||||
private readonly DbTableExists $dbTableExists,
|
||||
private ResponseRenderer $response,
|
||||
private Template $template,
|
||||
private DatabaseInterface $dbi,
|
||||
private Indexes $indexes,
|
||||
private DbTableExists $dbTableExists,
|
||||
private Config $config,
|
||||
) {
|
||||
}
|
||||
|
||||
@ -229,7 +230,7 @@ final class IndexesController implements InvocableController
|
||||
'form_params' => $formParams,
|
||||
'add_fields' => $addFields,
|
||||
'create_edit_table' => isset($_POST['create_edit_table']),
|
||||
'default_sliders_state' => Config::getInstance()->settings['InitialSlidersState'],
|
||||
'default_sliders_state' => $this->config->settings['InitialSlidersState'],
|
||||
'is_from_nav' => isset($_POST['is_from_nav']),
|
||||
]);
|
||||
}
|
||||
|
||||
@ -26,12 +26,13 @@ use function mb_strtolower;
|
||||
/**
|
||||
* Controller for table privileges
|
||||
*/
|
||||
final class PrivilegesController implements InvocableController
|
||||
final readonly class PrivilegesController implements InvocableController
|
||||
{
|
||||
public function __construct(
|
||||
private readonly ResponseRenderer $response,
|
||||
private readonly Privileges $privileges,
|
||||
private readonly DatabaseInterface $dbi,
|
||||
private ResponseRenderer $response,
|
||||
private Privileges $privileges,
|
||||
private DatabaseInterface $dbi,
|
||||
private Config $config,
|
||||
) {
|
||||
}
|
||||
|
||||
@ -74,7 +75,7 @@ final class PrivilegesController implements InvocableController
|
||||
)->getDisplay());
|
||||
}
|
||||
|
||||
$scriptName = Url::getFromRoute(Config::getInstance()->settings['DefaultTabTable']);
|
||||
$scriptName = Url::getFromRoute($this->config->settings['DefaultTabTable']);
|
||||
|
||||
$privileges = [];
|
||||
if ($this->dbi->isSuperUser()) {
|
||||
|
||||
@ -38,13 +38,14 @@ use function usort;
|
||||
*
|
||||
* Includes phpMyAdmin relations and InnoDB relations.
|
||||
*/
|
||||
final class RelationController implements InvocableController
|
||||
final readonly class RelationController implements InvocableController
|
||||
{
|
||||
public function __construct(
|
||||
private readonly ResponseRenderer $response,
|
||||
private readonly Template $template,
|
||||
private readonly Relation $relation,
|
||||
private readonly DatabaseInterface $dbi,
|
||||
private ResponseRenderer $response,
|
||||
private Template $template,
|
||||
private Relation $relation,
|
||||
private DatabaseInterface $dbi,
|
||||
private Config $config,
|
||||
) {
|
||||
}
|
||||
|
||||
@ -175,8 +176,7 @@ final class RelationController implements InvocableController
|
||||
$columnArray[$column->field] = $column->field;
|
||||
}
|
||||
|
||||
$config = Config::getInstance();
|
||||
if ($config->settings['NaturalOrder']) {
|
||||
if ($this->config->settings['NaturalOrder']) {
|
||||
uksort($columnArray, strnatcasecmp(...));
|
||||
}
|
||||
|
||||
@ -296,7 +296,7 @@ final class RelationController implements InvocableController
|
||||
'internal_relation_columns' => $internalRelationColumns,
|
||||
'url_params' => UrlParams::$params,
|
||||
'databases' => $this->dbi->getDatabaseList(),
|
||||
'default_sliders_state' => $config->settings['InitialSlidersState'],
|
||||
'default_sliders_state' => $this->config->settings['InitialSlidersState'],
|
||||
'route' => $request->getRoute(),
|
||||
'display_field' => $this->relation->getDisplayField(Current::$database, Current::$table),
|
||||
'foreign_key_row' => $foreignKeyRow,
|
||||
@ -370,7 +370,7 @@ final class RelationController implements InvocableController
|
||||
$columnList = $tableObj->getIndexedColumns(false, false);
|
||||
}
|
||||
|
||||
if (Config::getInstance()->settings['NaturalOrder']) {
|
||||
if ($this->config->settings['NaturalOrder']) {
|
||||
usort($columnList, strnatcasecmp(...));
|
||||
}
|
||||
|
||||
@ -413,7 +413,7 @@ final class RelationController implements InvocableController
|
||||
$tables = $tablesRs->fetchAllColumn();
|
||||
}
|
||||
|
||||
if (Config::getInstance()->settings['NaturalOrder']) {
|
||||
if ($this->config->settings['NaturalOrder']) {
|
||||
usort($tables, strnatcasecmp(...));
|
||||
}
|
||||
|
||||
|
||||
@ -95,6 +95,7 @@ final class SearchController implements InvocableController
|
||||
private readonly Relation $relation,
|
||||
private readonly DatabaseInterface $dbi,
|
||||
private readonly DbTableExists $dbTableExists,
|
||||
private readonly Config $config,
|
||||
) {
|
||||
}
|
||||
|
||||
@ -243,7 +244,7 @@ final class SearchController implements InvocableController
|
||||
new Transformations(),
|
||||
$this->template,
|
||||
new BookmarkRepository($this->dbi, $this->relation),
|
||||
Config::getInstance(),
|
||||
$this->config,
|
||||
);
|
||||
|
||||
$this->response->addHTML($sql->executeQueryAndSendQueryResponse(
|
||||
@ -266,9 +267,8 @@ final class SearchController implements InvocableController
|
||||
*/
|
||||
private function displaySelectionFormAction(): void
|
||||
{
|
||||
$config = Config::getInstance();
|
||||
if (UrlParams::$goto === '') {
|
||||
UrlParams::$goto = Url::getFromRoute($config->settings['DefaultTabTable']);
|
||||
UrlParams::$goto = Url::getFromRoute($this->config->settings['DefaultTabTable']);
|
||||
}
|
||||
|
||||
$properties = [];
|
||||
@ -285,8 +285,8 @@ final class SearchController implements InvocableController
|
||||
'column_names' => $this->columnNames,
|
||||
'column_types' => $this->columnTypes,
|
||||
'column_collations' => $this->columnCollations,
|
||||
'default_sliders_state' => $config->settings['InitialSlidersState'],
|
||||
'max_rows' => (int) $config->settings['MaxRows'],
|
||||
'default_sliders_state' => $this->config->settings['InitialSlidersState'],
|
||||
'max_rows' => (int) $this->config->settings['MaxRows'],
|
||||
]);
|
||||
}
|
||||
|
||||
@ -380,7 +380,7 @@ final class SearchController implements InvocableController
|
||||
$foreignData->foreignField,
|
||||
$foreignData->foreignDisplay,
|
||||
'',
|
||||
Config::getInstance()->settings['ForeignKeyMaxLimit'],
|
||||
$this->config->settings['ForeignKeyMaxLimit'],
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@ -18,15 +18,15 @@ use function implode;
|
||||
use function sprintf;
|
||||
use function trim;
|
||||
|
||||
final class ReservedWordCheckController implements InvocableController
|
||||
final readonly class ReservedWordCheckController implements InvocableController
|
||||
{
|
||||
public function __construct(private readonly ResponseRenderer $response)
|
||||
public function __construct(private ResponseRenderer $response, private Config $config)
|
||||
{
|
||||
}
|
||||
|
||||
public function __invoke(ServerRequest $request): Response
|
||||
{
|
||||
if (Config::getInstance()->settings['ReservedWordDisableWarning'] !== false) {
|
||||
if ($this->config->settings['ReservedWordDisableWarning'] !== false) {
|
||||
$this->response->setRequestStatus(false);
|
||||
|
||||
return $this->response->response();
|
||||
|
||||
@ -46,6 +46,7 @@ final class SaveController implements InvocableController
|
||||
private readonly DatabaseInterface $dbi,
|
||||
private readonly StructureController $structureController,
|
||||
private readonly UserPrivilegesFactory $userPrivilegesFactory,
|
||||
private readonly Config $config,
|
||||
) {
|
||||
$this->tableObj = $this->dbi->getTable(Current::$database, Current::$table);
|
||||
}
|
||||
@ -290,7 +291,7 @@ final class SaveController implements InvocableController
|
||||
if (
|
||||
isset($_POST['field_mimetype'])
|
||||
&& is_array($_POST['field_mimetype'])
|
||||
&& Config::getInstance()->settings['BrowseMIME']
|
||||
&& $this->config->settings['BrowseMIME']
|
||||
) {
|
||||
foreach ($_POST['field_mimetype'] as $fieldindex => $mimetype) {
|
||||
if (! isset($_POST['field_name'][$fieldindex]) || strlen($_POST['field_name'][$fieldindex]) <= 0) {
|
||||
|
||||
@ -44,18 +44,19 @@ use function str_contains;
|
||||
* Displays table structure infos like columns, indexes, size, rows
|
||||
* and allows manipulation of indexes and columns.
|
||||
*/
|
||||
class StructureController implements InvocableController
|
||||
readonly class StructureController implements InvocableController
|
||||
{
|
||||
private readonly Table $tableObj;
|
||||
private Table $tableObj;
|
||||
|
||||
public function __construct(
|
||||
private readonly ResponseRenderer $response,
|
||||
private readonly Template $template,
|
||||
private readonly Relation $relation,
|
||||
private readonly Transformations $transformations,
|
||||
private readonly DatabaseInterface $dbi,
|
||||
private readonly PageSettings $pageSettings,
|
||||
private readonly DbTableExists $dbTableExists,
|
||||
private ResponseRenderer $response,
|
||||
private Template $template,
|
||||
private Relation $relation,
|
||||
private Transformations $transformations,
|
||||
private DatabaseInterface $dbi,
|
||||
private PageSettings $pageSettings,
|
||||
private DbTableExists $dbTableExists,
|
||||
private Config $config,
|
||||
) {
|
||||
$this->tableObj = $this->dbi->getTable(Current::$database, Current::$table);
|
||||
}
|
||||
@ -156,10 +157,9 @@ class StructureController implements InvocableController
|
||||
$commentsMap = [];
|
||||
$mimeMap = [];
|
||||
|
||||
$config = Config::getInstance();
|
||||
if ($config->settings['ShowPropertyComments']) {
|
||||
if ($this->config->settings['ShowPropertyComments']) {
|
||||
$commentsMap = $this->relation->getComments(Current::$database, Current::$table);
|
||||
if ($relationParameters->browserTransformationFeature !== null && $config->settings['BrowseMIME']) {
|
||||
if ($relationParameters->browserTransformationFeature !== null && $this->config->settings['BrowseMIME']) {
|
||||
$mimeMap = $this->transformations->getMime(Current::$database, Current::$table, true);
|
||||
}
|
||||
}
|
||||
@ -175,7 +175,7 @@ class StructureController implements InvocableController
|
||||
*/
|
||||
// BEGIN - Calc Table Space
|
||||
// Get valid statistics whatever is the table type
|
||||
if ($config->settings['ShowStats']) {
|
||||
if ($this->config->settings['ShowStats']) {
|
||||
//get table stats in HTML format
|
||||
$tablestats = $this->getTableStats($isSystemSchema, $tableIsAView, $tableStorageEngine);
|
||||
//returning the response in JSON format to be used by Ajax
|
||||
@ -222,7 +222,7 @@ class StructureController implements InvocableController
|
||||
|
||||
$collation = Charsets::findCollationByName(
|
||||
$this->dbi,
|
||||
$config->selectedServer['DisableIS'],
|
||||
$this->config->selectedServer['DisableIS'],
|
||||
$field->collation ?? '',
|
||||
);
|
||||
if ($collation === null) {
|
||||
@ -243,7 +243,7 @@ class StructureController implements InvocableController
|
||||
'indexes' => Index::getFromTable($this->dbi, Current::$table, Current::$database),
|
||||
'indexes_duplicates' => Index::findDuplicates(Current::$table, Current::$database),
|
||||
'relation_parameters' => $relationParameters,
|
||||
'hide_structure_actions' => $config->settings['HideStructureActions'] === true,
|
||||
'hide_structure_actions' => $this->config->settings['HideStructureActions'] === true,
|
||||
'db' => Current::$database,
|
||||
'table' => Current::$table,
|
||||
'db_is_system_schema' => $isSystemSchema,
|
||||
@ -258,16 +258,16 @@ class StructureController implements InvocableController
|
||||
'columns_with_index' => $columnsWithIndex,
|
||||
'central_list' => $centralList,
|
||||
'comments_map' => $commentsMap,
|
||||
'browse_mime' => $config->settings['BrowseMIME'],
|
||||
'show_column_comments' => $config->settings['ShowColumnComments'],
|
||||
'show_stats' => $config->settings['ShowStats'],
|
||||
'browse_mime' => $this->config->settings['BrowseMIME'],
|
||||
'show_column_comments' => $this->config->settings['ShowColumnComments'],
|
||||
'show_stats' => $this->config->settings['ShowStats'],
|
||||
'mysql_int_version' => $this->dbi->getVersion(),
|
||||
'is_mariadb' => $this->dbi->isMariaDB(),
|
||||
'is_active' => Tracker::isActive(),
|
||||
'have_partitioning' => Partition::havePartitioning(),
|
||||
'partitions' => Partition::getPartitions(Current::$database, Current::$table),
|
||||
'partition_names' => Partition::getPartitionNames(Current::$database, Current::$table),
|
||||
'default_sliders_state' => $config->settings['InitialSlidersState'],
|
||||
'default_sliders_state' => $this->config->settings['InitialSlidersState'],
|
||||
'attributes' => $attributes,
|
||||
'displayed_fields' => $displayedFields,
|
||||
'row_comments' => $rowComments,
|
||||
@ -350,7 +350,7 @@ class StructureController implements InvocableController
|
||||
$tableCollation = [];
|
||||
$collation = Charsets::findCollationByName(
|
||||
$this->dbi,
|
||||
Config::getInstance()->selectedServer['DisableIS'],
|
||||
$this->config->selectedServer['DisableIS'],
|
||||
$this->tableObj->getCollation(),
|
||||
);
|
||||
if ($collation !== null) {
|
||||
|
||||
@ -77,6 +77,7 @@ final class ZoomSearchController implements InvocableController
|
||||
private readonly Relation $relation,
|
||||
private readonly DatabaseInterface $dbi,
|
||||
private readonly DbTableExists $dbTableExists,
|
||||
private readonly Config $config,
|
||||
) {
|
||||
}
|
||||
|
||||
@ -91,7 +92,6 @@ final class ZoomSearchController implements InvocableController
|
||||
}
|
||||
|
||||
UrlParams::$params = ['db' => Current::$database, 'table' => Current::$table];
|
||||
$config = Config::getInstance();
|
||||
|
||||
$databaseName = DatabaseName::tryFrom($request->getParam('db'));
|
||||
if ($databaseName === null || ! $this->dbTableExists->selectDatabase($databaseName)) {
|
||||
@ -178,7 +178,7 @@ final class ZoomSearchController implements InvocableController
|
||||
}
|
||||
|
||||
if (UrlParams::$goto === '') {
|
||||
UrlParams::$goto = Url::getFromRoute($config->settings['DefaultTabTable']);
|
||||
UrlParams::$goto = Url::getFromRoute($this->config->settings['DefaultTabTable']);
|
||||
}
|
||||
|
||||
$this->zoomSubmitAction($dataLabel, UrlParams::$goto);
|
||||
@ -244,9 +244,8 @@ final class ZoomSearchController implements InvocableController
|
||||
*/
|
||||
private function displaySelectionFormAction(string $dataLabel): void
|
||||
{
|
||||
$config = Config::getInstance();
|
||||
if (UrlParams::$goto === '') {
|
||||
UrlParams::$goto = Url::getFromRoute($config->settings['DefaultTabTable']);
|
||||
UrlParams::$goto = Url::getFromRoute($this->config->settings['DefaultTabTable']);
|
||||
}
|
||||
|
||||
$criteriaColumnNames = $_POST['criteriaColumnNames'] ?? null;
|
||||
@ -279,7 +278,7 @@ final class ZoomSearchController implements InvocableController
|
||||
'criteria_column_types' => $_POST['criteriaColumnTypes'] ?? null,
|
||||
'max_plot_limit' => ! empty($_POST['maxPlotLimit'])
|
||||
? (int) $_POST['maxPlotLimit']
|
||||
: (int) $config->settings['maxRowPlotLimit'],
|
||||
: (int) $this->config->settings['maxRowPlotLimit'],
|
||||
]);
|
||||
}
|
||||
|
||||
@ -407,7 +406,7 @@ final class ZoomSearchController implements InvocableController
|
||||
(string) $foreignData[$columnIndex]->foreignField,
|
||||
$foreignData[$columnIndex]->foreignDisplay,
|
||||
'',
|
||||
Config::getInstance()->settings['ForeignKeyMaxLimit'],
|
||||
$this->config->settings['ForeignKeyMaxLimit'],
|
||||
);
|
||||
}
|
||||
|
||||
@ -502,7 +501,7 @@ final class ZoomSearchController implements InvocableController
|
||||
$foreignData->foreignField,
|
||||
$foreignData->foreignDisplay,
|
||||
'',
|
||||
Config::getInstance()->settings['ForeignKeyMaxLimit'],
|
||||
$this->config->settings['ForeignKeyMaxLimit'],
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@ -12,19 +12,20 @@ use PhpMyAdmin\Theme\ThemeManager;
|
||||
use PhpMyAdmin\Url;
|
||||
use PhpMyAdmin\UserPreferences;
|
||||
|
||||
final class ThemeSetController implements InvocableController
|
||||
final readonly class ThemeSetController implements InvocableController
|
||||
{
|
||||
public function __construct(
|
||||
private readonly ResponseRenderer $response,
|
||||
private readonly ThemeManager $themeManager,
|
||||
private readonly UserPreferences $userPreferences,
|
||||
private ResponseRenderer $response,
|
||||
private ThemeManager $themeManager,
|
||||
private UserPreferences $userPreferences,
|
||||
private Config $config,
|
||||
) {
|
||||
}
|
||||
|
||||
public function __invoke(ServerRequest $request): Response
|
||||
{
|
||||
$theme = $request->getParsedBodyParamAsString('set_theme');
|
||||
if (! Config::getInstance()->settings['ThemeManager'] || $theme === '') {
|
||||
if (! $this->config->settings['ThemeManager'] || $theme === '') {
|
||||
if ($request->isAjax()) {
|
||||
$this->response->addJSON('themeColorMode', '');
|
||||
|
||||
|
||||
@ -19,12 +19,13 @@ use function __;
|
||||
/**
|
||||
* Displays and handles the form where the user can change their password.
|
||||
*/
|
||||
final class UserPasswordController implements InvocableController
|
||||
final readonly class UserPasswordController implements InvocableController
|
||||
{
|
||||
public function __construct(
|
||||
private readonly ResponseRenderer $response,
|
||||
private readonly UserPassword $userPassword,
|
||||
private readonly DatabaseInterface $dbi,
|
||||
private ResponseRenderer $response,
|
||||
private UserPassword $userPassword,
|
||||
private DatabaseInterface $dbi,
|
||||
private Config $config,
|
||||
) {
|
||||
}
|
||||
|
||||
@ -32,16 +33,15 @@ final class UserPasswordController implements InvocableController
|
||||
{
|
||||
$this->response->addScriptFiles(['server/privileges.js', 'vendor/zxcvbn-ts.js']);
|
||||
|
||||
$config = Config::getInstance();
|
||||
/**
|
||||
* Displays an error message and exits if the user isn't allowed to use this
|
||||
* script
|
||||
*/
|
||||
if (! $config->settings['ShowChgPassword']) {
|
||||
$config->settings['ShowChgPassword'] = $this->dbi->selectDb('mysql');
|
||||
if (! $this->config->settings['ShowChgPassword']) {
|
||||
$this->config->settings['ShowChgPassword'] = $this->dbi->selectDb('mysql');
|
||||
}
|
||||
|
||||
if ($config->selectedServer['auth_type'] === 'config' || ! $config->settings['ShowChgPassword']) {
|
||||
if ($this->config->selectedServer['auth_type'] === 'config' || ! $this->config->settings['ShowChgPassword']) {
|
||||
$this->response->addHTML(Message::error(
|
||||
__('You don\'t have sufficient privileges to be here right now!'),
|
||||
)->getDisplay());
|
||||
|
||||
@ -44,9 +44,10 @@ class CheckRelationsControllerTest extends AbstractTestCase
|
||||
$request = self::createStub(ServerRequest::class);
|
||||
|
||||
$response = new ResponseRenderer();
|
||||
Config::getInstance()->selectedServer['pmadb'] = '';
|
||||
$config = Config::getInstance();
|
||||
$config->selectedServer['pmadb'] = '';
|
||||
(new ReflectionProperty(Relation::class, 'cache'))->setValue(null, null);
|
||||
$controller = new CheckRelationsController($response, new Relation($this->dbi));
|
||||
$controller = new CheckRelationsController($response, new Relation($this->dbi), $config);
|
||||
$controller($request);
|
||||
|
||||
$actual = $response->getHTMLResult();
|
||||
@ -126,7 +127,7 @@ class CheckRelationsControllerTest extends AbstractTestCase
|
||||
$dbiDummy->addResult('SELECT NULL FROM `pma__history` LIMIT 0', []);
|
||||
$dbiDummy->addResult('SELECT NULL FROM `pma__relation` LIMIT 0', []);
|
||||
|
||||
$controller = new CheckRelationsController(new ResponseRenderer(), new Relation($dbi, $config));
|
||||
$controller = new CheckRelationsController(new ResponseRenderer(), new Relation($dbi, $config), $config);
|
||||
$response = $controller($request);
|
||||
|
||||
$responseBody = (string) $response->getBody();
|
||||
|
||||
@ -35,14 +35,15 @@ class AddControllerTest extends AbstractTestCase
|
||||
]);
|
||||
$relation = new Relation($dbi);
|
||||
$bookmarkRepository = new BookmarkRepository($dbi, $relation);
|
||||
$controller = new AddController($response, $bookmarkRepository);
|
||||
$controller = new AddController($response, $bookmarkRepository, new Config());
|
||||
$this->expectException(InvalidArgumentException::class);
|
||||
$controller($request);
|
||||
}
|
||||
|
||||
public function testWithoutRelationParameters(): void
|
||||
{
|
||||
Config::getInstance()->selectedServer['user'] = 'user';
|
||||
$config = Config::getInstance();
|
||||
$config->selectedServer['user'] = 'user';
|
||||
(new ReflectionProperty(Relation::class, 'cache'))->setValue(null, null);
|
||||
$dbi = $this->createDatabaseInterface();
|
||||
DatabaseInterface::$instance = $dbi;
|
||||
@ -50,14 +51,15 @@ class AddControllerTest extends AbstractTestCase
|
||||
$request = self::createStub(ServerRequest::class);
|
||||
$relation = new Relation($dbi);
|
||||
$bookmarkRepository = new BookmarkRepository($dbi, $relation);
|
||||
$controller = new AddController($response, $bookmarkRepository);
|
||||
$controller = new AddController($response, $bookmarkRepository, $config);
|
||||
$controller($request);
|
||||
self::assertSame(['message' => 'Failed'], $response->getJSONResult());
|
||||
}
|
||||
|
||||
public function testWithValidParameters(): void
|
||||
{
|
||||
Config::getInstance()->selectedServer['user'] = 'test_user';
|
||||
$config = Config::getInstance();
|
||||
$config->selectedServer['user'] = 'test_user';
|
||||
$relationParameters = RelationParameters::fromArray([
|
||||
'user' => 'test_user',
|
||||
'db' => 'pmadb',
|
||||
@ -84,7 +86,7 @@ class AddControllerTest extends AbstractTestCase
|
||||
]);
|
||||
$relation = new Relation($dbi);
|
||||
$bookmarkRepository = new BookmarkRepository($dbi, $relation);
|
||||
$controller = new AddController($response, $bookmarkRepository);
|
||||
$controller = new AddController($response, $bookmarkRepository, $config);
|
||||
$controller($request);
|
||||
self::assertSame(
|
||||
[
|
||||
|
||||
@ -39,7 +39,8 @@ class PrivilegesControllerTest extends AbstractTestCase
|
||||
public function testIndex(): void
|
||||
{
|
||||
Current::$database = 'test_db';
|
||||
Config::getInstance()->selectedServer['DisableIS'] = false;
|
||||
$config = Config::getInstance();
|
||||
$config->selectedServer['DisableIS'] = false;
|
||||
|
||||
$this->dummyDbi->addResult(
|
||||
'SHOW TABLES FROM `test_db`;',
|
||||
@ -69,6 +70,7 @@ class PrivilegesControllerTest extends AbstractTestCase
|
||||
$response,
|
||||
$serverPrivileges,
|
||||
DatabaseInterface::getInstance(),
|
||||
$config,
|
||||
))($request);
|
||||
$actual = $response->getHTMLResult();
|
||||
|
||||
@ -115,6 +117,7 @@ class PrivilegesControllerTest extends AbstractTestCase
|
||||
$response,
|
||||
self::createStub(Privileges::class),
|
||||
$this->createDatabaseInterface(),
|
||||
new Config(),
|
||||
))($request);
|
||||
$actual = $response->getHTMLResult();
|
||||
|
||||
|
||||
@ -25,7 +25,8 @@ final class RoutinesControllerTest extends AbstractTestCase
|
||||
{
|
||||
Current::$server = 2;
|
||||
Current::$database = 'test_db';
|
||||
Config::getInstance()->selectedServer['DisableIS'] = true;
|
||||
$config = Config::getInstance();
|
||||
$config->selectedServer['DisableIS'] = true;
|
||||
|
||||
$dummyDbi = $this->createDbiDummy();
|
||||
// phpcs:disable Generic.Files.LineLength.TooLong
|
||||
@ -110,6 +111,7 @@ final class RoutinesControllerTest extends AbstractTestCase
|
||||
$dbi,
|
||||
new Routines($dbi),
|
||||
new DbTableExists($dbi),
|
||||
$config,
|
||||
))($request);
|
||||
|
||||
$actual = $response->getHTMLResult();
|
||||
@ -297,7 +299,8 @@ HTML;
|
||||
{
|
||||
Current::$server = 2;
|
||||
Current::$database = 'test_db';
|
||||
Config::getInstance()->selectedServer['DisableIS'] = true;
|
||||
$config = Config::getInstance();
|
||||
$config->selectedServer['DisableIS'] = true;
|
||||
|
||||
$dummyDbi = $this->createDbiDummy();
|
||||
// phpcs:disable Generic.Files.LineLength.TooLong
|
||||
@ -333,6 +336,7 @@ HTML;
|
||||
$dbi,
|
||||
new Routines($dbi),
|
||||
new DbTableExists($dbi),
|
||||
$config,
|
||||
))($request);
|
||||
|
||||
$actual = $response->getHTMLResult();
|
||||
|
||||
@ -75,6 +75,7 @@ class StructureControllerTest extends AbstractTestCase
|
||||
$class = new ReflectionClass(StructureController::class);
|
||||
$method = $class->getMethod('getValuesForInnodbTable');
|
||||
$dbi = DatabaseInterface::getInstance();
|
||||
$config = Config::getInstance();
|
||||
$controller = new StructureController(
|
||||
$this->response,
|
||||
$this->template,
|
||||
@ -84,12 +85,13 @@ class StructureControllerTest extends AbstractTestCase
|
||||
self::createStub(TrackingChecker::class),
|
||||
self::createStub(PageSettings::class),
|
||||
new DbTableExists($dbi),
|
||||
$config,
|
||||
);
|
||||
// Showing statistics
|
||||
$property = $class->getProperty('isShowStats');
|
||||
$property->setValue($controller, true);
|
||||
|
||||
Config::getInstance()->settings['MaxExactCount'] = 10;
|
||||
$config->settings['MaxExactCount'] = 10;
|
||||
$currentTable = [
|
||||
'ENGINE' => 'InnoDB',
|
||||
'TABLE_ROWS' => 5,
|
||||
@ -124,6 +126,7 @@ class StructureControllerTest extends AbstractTestCase
|
||||
self::createStub(TrackingChecker::class),
|
||||
self::createStub(PageSettings::class),
|
||||
new DbTableExists($dbi),
|
||||
$config,
|
||||
);
|
||||
|
||||
$currentTable['ENGINE'] = 'InnoDB';
|
||||
@ -146,6 +149,7 @@ class StructureControllerTest extends AbstractTestCase
|
||||
$method = $class->getMethod('getValuesForAriaTable');
|
||||
|
||||
$dbi = DatabaseInterface::getInstance();
|
||||
$config = Config::getInstance();
|
||||
$controller = new StructureController(
|
||||
$this->response,
|
||||
$this->template,
|
||||
@ -155,6 +159,7 @@ class StructureControllerTest extends AbstractTestCase
|
||||
self::createStub(TrackingChecker::class),
|
||||
self::createStub(PageSettings::class),
|
||||
new DbTableExists($dbi),
|
||||
$config,
|
||||
);
|
||||
// Showing statistics
|
||||
$property = $class->getProperty('isShowStats');
|
||||
@ -187,6 +192,7 @@ class StructureControllerTest extends AbstractTestCase
|
||||
self::createStub(TrackingChecker::class),
|
||||
self::createStub(PageSettings::class),
|
||||
new DbTableExists($dbi),
|
||||
$config,
|
||||
);
|
||||
[$currentTable, , , , , , $sumSize] = $method->invokeArgs(
|
||||
$controller,
|
||||
@ -203,6 +209,7 @@ class StructureControllerTest extends AbstractTestCase
|
||||
self::createStub(TrackingChecker::class),
|
||||
self::createStub(PageSettings::class),
|
||||
new DbTableExists($dbi),
|
||||
$config,
|
||||
);
|
||||
[$currentTable] = $method->invokeArgs(
|
||||
$controller,
|
||||
@ -229,6 +236,7 @@ class StructureControllerTest extends AbstractTestCase
|
||||
self::createStub(TrackingChecker::class),
|
||||
self::createStub(PageSettings::class),
|
||||
new DbTableExists($dbi),
|
||||
Config::getInstance(),
|
||||
);
|
||||
|
||||
// When parameter $db is empty
|
||||
@ -265,6 +273,7 @@ class StructureControllerTest extends AbstractTestCase
|
||||
self::createStub(TrackingChecker::class),
|
||||
self::createStub(PageSettings::class),
|
||||
new DbTableExists($dbi),
|
||||
Config::getInstance(),
|
||||
);
|
||||
// Showing statistics
|
||||
$class = new ReflectionClass(StructureController::class);
|
||||
@ -313,6 +322,7 @@ class StructureControllerTest extends AbstractTestCase
|
||||
Current::$table = 'mytable';
|
||||
|
||||
$dbi = DatabaseInterface::getInstance();
|
||||
$config = Config::getInstance();
|
||||
$structureController = new StructureController(
|
||||
$this->response,
|
||||
$this->template,
|
||||
@ -322,6 +332,7 @@ class StructureControllerTest extends AbstractTestCase
|
||||
self::createStub(TrackingChecker::class),
|
||||
self::createStub(PageSettings::class),
|
||||
new DbTableExists($dbi),
|
||||
$config,
|
||||
);
|
||||
|
||||
self::assertSame(
|
||||
@ -335,7 +346,7 @@ class StructureControllerTest extends AbstractTestCase
|
||||
);
|
||||
|
||||
// Enable stats
|
||||
Config::getInstance()->settings['ShowStats'] = true;
|
||||
$config->settings['ShowStats'] = true;
|
||||
$this->callFunction(
|
||||
$structureController,
|
||||
StructureController::class,
|
||||
|
||||
@ -188,7 +188,12 @@ final class ExportControllerTest extends AbstractTestCase
|
||||
COMMIT;
|
||||
SQL;
|
||||
|
||||
$exportController = new ExportController(new ResponseRenderer(), new Export($dbi), ResponseFactory::create());
|
||||
$exportController = new ExportController(
|
||||
new ResponseRenderer(),
|
||||
new Export($dbi),
|
||||
ResponseFactory::create(),
|
||||
$config,
|
||||
);
|
||||
$response = $exportController($request);
|
||||
$output = $this->getActualOutputForAssertion();
|
||||
|
||||
@ -348,7 +353,12 @@ final class ExportControllerTest extends AbstractTestCase
|
||||
COMMIT;
|
||||
SQL;
|
||||
|
||||
$exportController = new ExportController(new ResponseRenderer(), new Export($dbi), ResponseFactory::create());
|
||||
$exportController = new ExportController(
|
||||
new ResponseRenderer(),
|
||||
new Export($dbi),
|
||||
ResponseFactory::create(),
|
||||
$config,
|
||||
);
|
||||
$response = $exportController($request);
|
||||
$output = $this->getActualOutputForAssertion();
|
||||
|
||||
@ -498,7 +508,7 @@ final class ExportControllerTest extends AbstractTestCase
|
||||
self::assertInstanceOf(Export::class, $export);
|
||||
(new ReflectionProperty(Export::class, 'dbi'))->setValue($export, $dbi);
|
||||
|
||||
$exportController = new ExportController(new ResponseRenderer(), $export, ResponseFactory::create());
|
||||
$exportController = new ExportController(new ResponseRenderer(), $export, ResponseFactory::create(), $config);
|
||||
$response = $exportController($request);
|
||||
|
||||
$output = $this->getActualOutputForAssertion();
|
||||
@ -652,7 +662,7 @@ final class ExportControllerTest extends AbstractTestCase
|
||||
self::assertInstanceOf(Export::class, $export);
|
||||
(new ReflectionProperty(Export::class, 'dbi'))->setValue($export, $dbi);
|
||||
|
||||
$exportController = new ExportController(new ResponseRenderer(), $export, ResponseFactory::create());
|
||||
$exportController = new ExportController(new ResponseRenderer(), $export, ResponseFactory::create(), $config);
|
||||
$response = $exportController($request);
|
||||
|
||||
$output = (string) $response->getBody();
|
||||
|
||||
@ -44,7 +44,8 @@ class CreateControllerTest extends AbstractTestCase
|
||||
]);
|
||||
(new ReflectionProperty(Relation::class, 'cache'))->setValue(null, $relationParameters);
|
||||
|
||||
Config::getInstance()->selectedServer['user'] = 'user';
|
||||
$config = Config::getInstance();
|
||||
$config->selectedServer['user'] = 'user';
|
||||
|
||||
$response = new ResponseRenderer();
|
||||
$template = new Template();
|
||||
@ -61,6 +62,7 @@ class CreateControllerTest extends AbstractTestCase
|
||||
$template,
|
||||
new TemplateModel($this->dbi),
|
||||
new Relation($this->dbi),
|
||||
$config,
|
||||
))($request);
|
||||
|
||||
$templates = [
|
||||
|
||||
@ -33,7 +33,8 @@ class DeleteControllerTest extends AbstractTestCase
|
||||
|
||||
public function testDelete(): void
|
||||
{
|
||||
Config::getInstance()->selectedServer['user'] = 'user';
|
||||
$config = Config::getInstance();
|
||||
$config->selectedServer['user'] = 'user';
|
||||
|
||||
$response = new ResponseRenderer();
|
||||
$request = self::createStub(ServerRequest::class);
|
||||
@ -42,6 +43,7 @@ class DeleteControllerTest extends AbstractTestCase
|
||||
$response,
|
||||
new TemplateModel($this->dbi),
|
||||
new Relation($this->dbi),
|
||||
$config,
|
||||
))($request);
|
||||
|
||||
self::assertTrue($response->hasSuccessState());
|
||||
|
||||
@ -42,7 +42,8 @@ class LoadControllerTest extends AbstractTestCase
|
||||
]);
|
||||
(new ReflectionProperty(Relation::class, 'cache'))->setValue(null, $relationParameters);
|
||||
|
||||
Config::getInstance()->selectedServer['user'] = 'user';
|
||||
$config = Config::getInstance();
|
||||
$config->selectedServer['user'] = 'user';
|
||||
|
||||
$response = new ResponseRenderer();
|
||||
$request = ServerRequestFactory::create()->createServerRequest('POST', 'https://example.com/')
|
||||
@ -52,6 +53,7 @@ class LoadControllerTest extends AbstractTestCase
|
||||
$response,
|
||||
new TemplateModel($this->dbi),
|
||||
new Relation($this->dbi),
|
||||
$config,
|
||||
))($request);
|
||||
|
||||
self::assertTrue($response->hasSuccessState());
|
||||
|
||||
@ -33,7 +33,8 @@ class UpdateControllerTest extends AbstractTestCase
|
||||
|
||||
public function testUpdate(): void
|
||||
{
|
||||
Config::getInstance()->selectedServer['user'] = 'user';
|
||||
$config = Config::getInstance();
|
||||
$config->selectedServer['user'] = 'user';
|
||||
|
||||
$response = new ResponseRenderer();
|
||||
$request = self::createStub(ServerRequest::class);
|
||||
@ -42,6 +43,7 @@ class UpdateControllerTest extends AbstractTestCase
|
||||
$response,
|
||||
new TemplateModel($this->dbi),
|
||||
new Relation($this->dbi),
|
||||
$config,
|
||||
))($request);
|
||||
|
||||
self::assertTrue($response->hasSuccessState());
|
||||
|
||||
@ -41,7 +41,8 @@ class ImportControllerTest extends AbstractTestCase
|
||||
{
|
||||
$this->setLanguage();
|
||||
|
||||
Config::getInstance()->selectedServer['user'] = 'user';
|
||||
$config = Config::getInstance();
|
||||
$config->selectedServer['user'] = 'user';
|
||||
|
||||
// Some params were not added as they are not required for this test
|
||||
Sql::$showAsPhp = null;
|
||||
@ -101,7 +102,7 @@ class ImportControllerTest extends AbstractTestCase
|
||||
self::createStub(Transformations::class),
|
||||
$template,
|
||||
$bookmarkRepository,
|
||||
Config::getInstance(),
|
||||
$config,
|
||||
);
|
||||
|
||||
$importController = new ImportController(
|
||||
@ -110,6 +111,7 @@ class ImportControllerTest extends AbstractTestCase
|
||||
$sql,
|
||||
$this->dbi,
|
||||
$bookmarkRepository,
|
||||
$config,
|
||||
);
|
||||
|
||||
$this->dummyDbi->addSelectDb('pma_test');
|
||||
|
||||
@ -135,6 +135,7 @@ class TableControllerTest extends AbstractTestCase
|
||||
$relation,
|
||||
$this->dbi,
|
||||
new DbTableExists($this->dbi),
|
||||
$config,
|
||||
);
|
||||
$controller($request);
|
||||
|
||||
|
||||
@ -48,7 +48,7 @@ class BinlogControllerTest extends AbstractTestCase
|
||||
{
|
||||
$response = new ResponseRenderer();
|
||||
|
||||
$controller = new BinlogController($response, DatabaseInterface::getInstance());
|
||||
$controller = new BinlogController($response, DatabaseInterface::getInstance(), Config::getInstance());
|
||||
|
||||
$request = ServerRequestFactory::create()->createServerRequest('POST', 'https://example.com/')
|
||||
->withParsedBody([
|
||||
|
||||
@ -43,7 +43,7 @@ class CollationsControllerTest extends AbstractTestCase
|
||||
{
|
||||
$response = new ResponseRenderer();
|
||||
|
||||
$controller = new CollationsController($response, DatabaseInterface::getInstance());
|
||||
$controller = new CollationsController($response, DatabaseInterface::getInstance(), Config::getInstance());
|
||||
|
||||
$this->dummyDbi->addSelectDb('mysql');
|
||||
$controller(self::createStub(ServerRequest::class));
|
||||
|
||||
@ -35,13 +35,14 @@ final class CreateControllerTest extends AbstractTestCase
|
||||
|
||||
public function testCreateDatabase(): void
|
||||
{
|
||||
Config::getInstance()->selectedServer['DisableIS'] = false;
|
||||
$config = Config::getInstance();
|
||||
$config->selectedServer['DisableIS'] = false;
|
||||
Current::$database = 'pma_test';
|
||||
Current::$table = '';
|
||||
|
||||
$response = new ResponseRenderer();
|
||||
|
||||
$controller = new CreateController($response, $this->dbi);
|
||||
$controller = new CreateController($response, $this->dbi, $config);
|
||||
|
||||
$request = ServerRequestFactory::create()->createServerRequest('POST', 'https://example.com/')
|
||||
->withParsedBody([
|
||||
@ -57,7 +58,7 @@ final class CreateControllerTest extends AbstractTestCase
|
||||
|
||||
$response = new ResponseRenderer();
|
||||
|
||||
$controller = new CreateController($response, $this->dbi);
|
||||
$controller = new CreateController($response, $this->dbi, $config);
|
||||
|
||||
$request = ServerRequestFactory::create()->createServerRequest('POST', 'https://example.com/')
|
||||
->withParsedBody([
|
||||
|
||||
@ -36,7 +36,8 @@ class DestroyControllerTest extends AbstractTestCase
|
||||
|
||||
$response = new ResponseRenderer();
|
||||
|
||||
Config::getInstance()->settings['AllowUserDropDatabase'] = true;
|
||||
$config = Config::getInstance();
|
||||
$config->settings['AllowUserDropDatabase'] = true;
|
||||
|
||||
$controller = new DestroyController(
|
||||
$response,
|
||||
@ -44,6 +45,7 @@ class DestroyControllerTest extends AbstractTestCase
|
||||
new Transformations(),
|
||||
new RelationCleanup($dbi, new Relation($dbi)),
|
||||
new UserPrivilegesFactory($dbi),
|
||||
$config,
|
||||
);
|
||||
|
||||
$request = self::createStub(ServerRequest::class);
|
||||
|
||||
@ -46,7 +46,7 @@ class DatabasesControllerTest extends AbstractTestCase
|
||||
|
||||
$response = new ResponseRenderer();
|
||||
|
||||
$controller = new DatabasesController($response, $this->dbi, new UserPrivilegesFactory($this->dbi));
|
||||
$controller = new DatabasesController($response, $this->dbi, new UserPrivilegesFactory($this->dbi), $config);
|
||||
|
||||
$this->dummyDbi->addResult(
|
||||
'SELECT `SCHEMA_NAME` FROM `INFORMATION_SCHEMA`.`SCHEMATA`',
|
||||
@ -84,7 +84,7 @@ class DatabasesControllerTest extends AbstractTestCase
|
||||
$response = new ResponseRenderer();
|
||||
|
||||
$dbi = DatabaseInterface::getInstance();
|
||||
$controller = new DatabasesController($response, $dbi, new UserPrivilegesFactory($dbi));
|
||||
$controller = new DatabasesController($response, $dbi, new UserPrivilegesFactory($dbi), $config);
|
||||
|
||||
$config->settings['ShowCreateDb'] = true;
|
||||
|
||||
|
||||
@ -4,6 +4,7 @@ declare(strict_types=1);
|
||||
|
||||
namespace PhpMyAdmin\Tests\Controllers;
|
||||
|
||||
use PhpMyAdmin\Config;
|
||||
use PhpMyAdmin\ConfigStorage\Relation;
|
||||
use PhpMyAdmin\ConfigStorage\RelationParameters;
|
||||
use PhpMyAdmin\Controllers\SyncFavoriteTablesController;
|
||||
@ -52,10 +53,7 @@ final class SyncFavoriteTablesControllerTest extends AbstractTestCase
|
||||
|
||||
$response = new ResponseStub();
|
||||
$response->setAjax(true);
|
||||
$controller = new SyncFavoriteTablesController(
|
||||
$response,
|
||||
new Relation($dbi),
|
||||
);
|
||||
$controller = new SyncFavoriteTablesController($response, new Relation($dbi), new Config());
|
||||
|
||||
// The user hash for test
|
||||
$user = 'dc76e9f0c0006e8f919e0c515c66dbba3982f785';
|
||||
|
||||
@ -4,6 +4,7 @@ declare(strict_types=1);
|
||||
|
||||
namespace PhpMyAdmin\Tests\Controllers\Table;
|
||||
|
||||
use PhpMyAdmin\Config;
|
||||
use PhpMyAdmin\Controllers\Table\ChartController;
|
||||
use PhpMyAdmin\Current;
|
||||
use PhpMyAdmin\Dbal\DatabaseInterface;
|
||||
@ -104,7 +105,7 @@ class ChartControllerTest extends AbstractTestCase
|
||||
'unlim_num_rows' => '4',
|
||||
]);
|
||||
|
||||
(new ChartController($response, $dbi, new DbTableExists($dbi)))($request);
|
||||
(new ChartController($response, $dbi, new DbTableExists($dbi), new Config()))($request);
|
||||
self::assertSame($expected, $response->getHTMLResult());
|
||||
}
|
||||
}
|
||||
|
||||
@ -57,7 +57,7 @@ class DeleteRowsControllerTest extends AbstractTestCase
|
||||
->withParsedBody(['original_sql_query' => 'SELECT * FROM `test_db`.`test_table`']);
|
||||
|
||||
$response = new ResponseRenderer();
|
||||
(new DeleteRowsController($response, new Template(), $dbi))($request);
|
||||
(new DeleteRowsController($response, new Template(), $dbi, $config))($request);
|
||||
$actual = $response->getHTMLResult();
|
||||
self::assertStringContainsString(
|
||||
'<div class="alert alert-success border-top-0 border-start-0 border-end-0 rounded-bottom-0 mb-0"'
|
||||
|
||||
@ -4,6 +4,7 @@ declare(strict_types=1);
|
||||
|
||||
namespace PhpMyAdmin\Tests\Controllers\Table;
|
||||
|
||||
use PhpMyAdmin\Config;
|
||||
use PhpMyAdmin\Controllers\Table\FindReplaceController;
|
||||
use PhpMyAdmin\Current;
|
||||
use PhpMyAdmin\Dbal\DatabaseInterface;
|
||||
@ -37,6 +38,7 @@ final class FindReplaceControllerTest extends AbstractTestCase
|
||||
new Template(),
|
||||
$dbi,
|
||||
new DbTableExists($dbi),
|
||||
new Config(),
|
||||
);
|
||||
|
||||
$request = ServerRequestFactory::create()->createServerRequest('GET', 'http://example.com/')
|
||||
@ -83,6 +85,7 @@ final class FindReplaceControllerTest extends AbstractTestCase
|
||||
new Template(),
|
||||
$dbi,
|
||||
new DbTableExists($dbi),
|
||||
new Config(),
|
||||
);
|
||||
|
||||
$request = ServerRequestFactory::create()->createServerRequest('GET', 'http://example.com/')
|
||||
|
||||
@ -5,6 +5,7 @@ declare(strict_types=1);
|
||||
namespace PhpMyAdmin\Tests\Controllers\Table;
|
||||
|
||||
use Fig\Http\Message\StatusCodeInterface;
|
||||
use PhpMyAdmin\Config;
|
||||
use PhpMyAdmin\Controllers\Table\GisVisualizationController;
|
||||
use PhpMyAdmin\Core;
|
||||
use PhpMyAdmin\Current;
|
||||
@ -120,6 +121,7 @@ class GisVisualizationControllerTest extends AbstractTestCase
|
||||
$dbi,
|
||||
new DbTableExists($dbi),
|
||||
ResponseFactory::create(),
|
||||
new Config(),
|
||||
);
|
||||
$response = $controller($request);
|
||||
|
||||
|
||||
@ -94,7 +94,7 @@ class ImportControllerTest extends AbstractTestCase
|
||||
->withQueryParams(['db' => 'test_db', 'table' => 'test_table', 'format' => 'xml']);
|
||||
|
||||
$response = new ResponseRenderer();
|
||||
(new ImportController($response, $dbi, $pageSettings, new DbTableExists($dbi)))($request);
|
||||
(new ImportController($response, $dbi, $pageSettings, new DbTableExists($dbi), $config))($request);
|
||||
self::assertSame($expected, $response->getHTMLResult());
|
||||
}
|
||||
}
|
||||
|
||||
@ -99,6 +99,7 @@ class IndexesControllerTest extends AbstractTestCase
|
||||
$dbi,
|
||||
new Indexes($dbi),
|
||||
new DbTableExists($dbi),
|
||||
Config::getInstance(),
|
||||
);
|
||||
|
||||
$_POST['create_index'] = true;
|
||||
|
||||
@ -36,7 +36,8 @@ class PrivilegesControllerTest extends AbstractTestCase
|
||||
{
|
||||
Current::$database = 'db';
|
||||
Current::$table = 'table';
|
||||
Config::getInstance()->selectedServer['DisableIS'] = false;
|
||||
$config = Config::getInstance();
|
||||
$config->selectedServer['DisableIS'] = false;
|
||||
|
||||
$privileges = [];
|
||||
|
||||
@ -52,6 +53,7 @@ class PrivilegesControllerTest extends AbstractTestCase
|
||||
$response,
|
||||
$serverPrivileges,
|
||||
DatabaseInterface::getInstance(),
|
||||
$config,
|
||||
))($request);
|
||||
$actual = $response->getHTMLResult();
|
||||
|
||||
@ -102,6 +104,7 @@ class PrivilegesControllerTest extends AbstractTestCase
|
||||
$response,
|
||||
self::createStub(Privileges::class),
|
||||
$this->createDatabaseInterface(),
|
||||
new Config(),
|
||||
))($request);
|
||||
$actual = $response->getHTMLResult();
|
||||
|
||||
@ -119,6 +122,7 @@ class PrivilegesControllerTest extends AbstractTestCase
|
||||
$response,
|
||||
self::createStub(Privileges::class),
|
||||
$this->createDatabaseInterface(),
|
||||
new Config(),
|
||||
))($request);
|
||||
$actual = $response->getHTMLResult();
|
||||
|
||||
|
||||
@ -76,6 +76,7 @@ class RelationControllerTest extends AbstractTestCase
|
||||
$this->template,
|
||||
new Relation($this->dbi),
|
||||
$this->dbi,
|
||||
Config::getInstance(),
|
||||
);
|
||||
|
||||
$ctrl->getDropdownValueForTable();
|
||||
@ -109,6 +110,7 @@ class RelationControllerTest extends AbstractTestCase
|
||||
$this->template,
|
||||
new Relation($this->dbi),
|
||||
$this->dbi,
|
||||
Config::getInstance(),
|
||||
);
|
||||
|
||||
$ctrl->getDropdownValueForTable();
|
||||
@ -140,6 +142,7 @@ class RelationControllerTest extends AbstractTestCase
|
||||
$this->template,
|
||||
new Relation($this->dbi),
|
||||
$this->dbi,
|
||||
Config::getInstance(),
|
||||
);
|
||||
|
||||
$_POST['foreign'] = 'true';
|
||||
@ -173,6 +176,7 @@ class RelationControllerTest extends AbstractTestCase
|
||||
$this->template,
|
||||
new Relation($this->dbi),
|
||||
$this->dbi,
|
||||
Config::getInstance(),
|
||||
);
|
||||
|
||||
$_POST['foreign'] = 'false';
|
||||
|
||||
@ -101,6 +101,7 @@ class ReplaceControllerTest extends AbstractTestCase
|
||||
|
||||
$pageSettings = self::createStub(PageSettings::class);
|
||||
$bookmarkRepository = new BookmarkRepository($dbi, $relation);
|
||||
$config = Config::getInstance();
|
||||
$sqlController = new SqlController(
|
||||
$response,
|
||||
new Sql(
|
||||
@ -110,16 +111,17 @@ class ReplaceControllerTest extends AbstractTestCase
|
||||
$transformations,
|
||||
$template,
|
||||
$bookmarkRepository,
|
||||
Config::getInstance(),
|
||||
$config,
|
||||
),
|
||||
$dbi,
|
||||
$pageSettings,
|
||||
$bookmarkRepository,
|
||||
$config,
|
||||
);
|
||||
|
||||
$replaceController = new ReplaceController(
|
||||
$response,
|
||||
new InsertEdit($dbi, $relation, $transformations, new FileListing(), $template, Config::getInstance()),
|
||||
new InsertEdit($dbi, $relation, $transformations, new FileListing(), $template, $config),
|
||||
$transformations,
|
||||
$relation,
|
||||
$dbi,
|
||||
|
||||
@ -4,6 +4,7 @@ declare(strict_types=1);
|
||||
|
||||
namespace PhpMyAdmin\Tests\Controllers\Table;
|
||||
|
||||
use PhpMyAdmin\Config;
|
||||
use PhpMyAdmin\ConfigStorage\Relation;
|
||||
use PhpMyAdmin\Controllers\Table\SearchController;
|
||||
use PhpMyAdmin\Current;
|
||||
@ -47,6 +48,7 @@ final class SearchControllerTest extends AbstractTestCase
|
||||
new Relation($dbi),
|
||||
$dbi,
|
||||
new DbTableExists($dbi),
|
||||
new Config(),
|
||||
);
|
||||
$controller($request);
|
||||
|
||||
|
||||
@ -4,6 +4,7 @@ declare(strict_types=1);
|
||||
|
||||
namespace PhpMyAdmin\Tests\Controllers\Table\Structure;
|
||||
|
||||
use PhpMyAdmin\Config;
|
||||
use PhpMyAdmin\ConfigStorage\Relation;
|
||||
use PhpMyAdmin\Controllers\Table\Structure\SaveController;
|
||||
use PhpMyAdmin\Controllers\Table\StructureController;
|
||||
@ -100,6 +101,7 @@ class SaveControllerTest extends AbstractTestCase
|
||||
$dbi,
|
||||
$mock,
|
||||
new UserPrivilegesFactory($dbi),
|
||||
new Config(),
|
||||
))($request);
|
||||
|
||||
self::assertArrayNotHasKey('selected', $_POST);
|
||||
@ -122,6 +124,7 @@ class SaveControllerTest extends AbstractTestCase
|
||||
$dbi,
|
||||
self::createStub(StructureController::class),
|
||||
new UserPrivilegesFactory($dbi),
|
||||
new Config(),
|
||||
);
|
||||
|
||||
self::assertFalse(
|
||||
|
||||
@ -103,6 +103,7 @@ class StructureControllerTest extends AbstractTestCase
|
||||
$this->dbi,
|
||||
$pageSettings,
|
||||
new DbTableExists($this->dbi),
|
||||
$config,
|
||||
))($request);
|
||||
|
||||
$expected = $pageSettings->getHTML();
|
||||
|
||||
@ -26,7 +26,8 @@ final class ZoomSearchControllerTest extends AbstractTestCase
|
||||
Current::$server = 2;
|
||||
Current::$database = 'test_db';
|
||||
Current::$table = 'test_table';
|
||||
Config::getInstance()->selectedServer['DisableIS'] = true;
|
||||
$config = Config::getInstance();
|
||||
$config->selectedServer['DisableIS'] = true;
|
||||
UrlParams::$goto = '';
|
||||
|
||||
$dbiDummy = $this->createDbiDummy();
|
||||
@ -48,6 +49,7 @@ final class ZoomSearchControllerTest extends AbstractTestCase
|
||||
new Relation($dbi),
|
||||
$dbi,
|
||||
new DbTableExists($dbi),
|
||||
$config,
|
||||
);
|
||||
$controller($request);
|
||||
|
||||
@ -72,7 +74,8 @@ final class ZoomSearchControllerTest extends AbstractTestCase
|
||||
{
|
||||
Current::$database = 'test_db';
|
||||
Current::$table = 'test_table';
|
||||
Config::getInstance()->selectedServer['DisableIS'] = true;
|
||||
$config = Config::getInstance();
|
||||
$config->selectedServer['DisableIS'] = true;
|
||||
|
||||
$_POST['field'] = 'datetimefield';
|
||||
|
||||
@ -96,6 +99,7 @@ final class ZoomSearchControllerTest extends AbstractTestCase
|
||||
new Relation($dbi),
|
||||
$dbi,
|
||||
new DbTableExists($dbi),
|
||||
$config,
|
||||
);
|
||||
$controller($request);
|
||||
|
||||
|
||||
@ -27,7 +27,8 @@ class ThemeSetControllerTest extends AbstractTestCase
|
||||
|
||||
public function testSetTheme(): void
|
||||
{
|
||||
Config::getInstance()->settings['ThemeManager'] = true;
|
||||
$config = Config::getInstance();
|
||||
$config->settings['ThemeManager'] = true;
|
||||
|
||||
$request = ServerRequestFactory::create()->createServerRequest('POST', 'https://example.com/')
|
||||
->withParsedBody(['set_theme' => 'theme_name', 'themeColorMode' => '']);
|
||||
@ -42,13 +43,14 @@ class ThemeSetControllerTest extends AbstractTestCase
|
||||
$userPreferences->expects(self::once())->method('save')
|
||||
->with(self::equalTo(['ThemeDefault' => 'theme_name']));
|
||||
|
||||
(new ThemeSetController(new ResponseRenderer(), $themeManager, $userPreferences))($request);
|
||||
(new ThemeSetController(new ResponseRenderer(), $themeManager, $userPreferences, $config))($request);
|
||||
}
|
||||
|
||||
#[DataProvider('providerForTestWithoutTheme')]
|
||||
public function testWithoutTheme(bool $hasThemes, string $themeName): void
|
||||
{
|
||||
Config::getInstance()->settings['ThemeManager'] = $hasThemes;
|
||||
$config = Config::getInstance();
|
||||
$config->settings['ThemeManager'] = $hasThemes;
|
||||
|
||||
$request = ServerRequestFactory::create()->createServerRequest('POST', 'https://example.com/')
|
||||
->withParsedBody(['set_theme' => $themeName]);
|
||||
@ -61,7 +63,7 @@ class ThemeSetControllerTest extends AbstractTestCase
|
||||
$userPreferences->expects(self::never())->method('load');
|
||||
$userPreferences->expects(self::never())->method('save');
|
||||
|
||||
(new ThemeSetController(new ResponseRenderer(), $themeManager, $userPreferences))($request);
|
||||
(new ThemeSetController(new ResponseRenderer(), $themeManager, $userPreferences, $config))($request);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Loading…
Reference in New Issue
Block a user