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\Relation
;
12 use PhpMyAdmin\Response
;
14 if (! defined('ROOT_PATH')) {
15 define('ROOT_PATH', __DIR__
. DIRECTORY_SEPARATOR
);
18 require_once ROOT_PATH
. 'libraries/common.inc.php';
20 /** @var Response $response */
21 $response = $containerBuilder->get(Response
::class);
23 /** @var DatabaseInterface $dbi */
24 $dbi = $containerBuilder->get(DatabaseInterface
::class);
26 /** @var Relation $relation */
27 $relation = $containerBuilder->get('relation');
29 // If request for creating the pmadb
30 if (isset($_POST['create_pmadb']) && $relation->createPmaDatabase()) {
31 $relation->fixPmaTables('phpmyadmin');
34 // If request for creating all PMA tables.
35 if (isset($_POST['fixall_pmadb'])) {
36 $relation->fixPmaTables($GLOBALS['db']);
39 $cfgRelation = $relation->getRelationsParam();
40 // If request for creating missing PMA tables.
41 if (isset($_POST['fix_pmadb'])) {
42 $relation->fixPmaTables($cfgRelation['db']);
46 $relation->getRelationsParamDiagnostic($cfgRelation)