2 /* vim: set expandtab sw=4 ts=4 sts=4: */
4 * Displays status of phpMyAdmin configuration storage
8 declare(strict_types
=1);
10 use PhpMyAdmin\DatabaseInterface
;
11 use PhpMyAdmin\Di\Container
;
12 use PhpMyAdmin\Relation
;
13 use PhpMyAdmin\Response
;
15 if (! defined('ROOT_PATH')) {
16 define('ROOT_PATH', __DIR__
. DIRECTORY_SEPARATOR
);
19 require_once ROOT_PATH
. 'libraries/common.inc.php';
21 $container = Container
::getDefaultContainer();
22 $container->set(Response
::class, Response
::getInstance());
24 /** @var Response $response */
25 $response = $container->get(Response
::class);
27 /** @var DatabaseInterface $dbi */
28 $dbi = $container->get(DatabaseInterface
::class);
30 /** @var Relation $relation */
31 $relation = $containerBuilder->get('relation');
33 // If request for creating the pmadb
34 if (isset($_POST['create_pmadb']) && $relation->createPmaDatabase()) {
35 $relation->fixPmaTables('phpmyadmin');
38 // If request for creating all PMA tables.
39 if (isset($_POST['fixall_pmadb'])) {
40 $relation->fixPmaTables($GLOBALS['db']);
43 $cfgRelation = $relation->getRelationsParam();
44 // If request for creating missing PMA tables.
45 if (isset($_POST['fix_pmadb'])) {
46 $relation->fixPmaTables($cfgRelation['db']);
50 $relation->getRelationsParamDiagnostic($cfgRelation)