Merge branch 'origin/master' into Weblate.
[phpmyadmin.git] / chk_rel.php
blobcaa7c36dccaed2bc00c0ea2b1c72c74a96db1a8d
1 <?php
2 /* vim: set expandtab sw=4 ts=4 sts=4: */
3 /**
4 * Displays status of phpMyAdmin configuration storage
6 * @package PhpMyAdmin
7 */
8 declare(strict_types=1);
10 use PhpMyAdmin\Relation;
11 use PhpMyAdmin\Response;
13 if (! defined('ROOT_PATH')) {
14 define('ROOT_PATH', __DIR__ . DIRECTORY_SEPARATOR);
17 require_once ROOT_PATH . 'libraries/common.inc.php';
19 $relation = new Relation($GLOBALS['dbi']);
21 // If request for creating the pmadb
22 if (isset($_POST['create_pmadb']) && $relation->createPmaDatabase()) {
23 $relation->fixPmaTables('phpmyadmin');
26 // If request for creating all PMA tables.
27 if (isset($_POST['fixall_pmadb'])) {
28 $relation->fixPmaTables($GLOBALS['db']);
31 $cfgRelation = $relation->getRelationsParam();
32 // If request for creating missing PMA tables.
33 if (isset($_POST['fix_pmadb'])) {
34 $relation->fixPmaTables($cfgRelation['db']);
37 $response = Response::getInstance();
38 $response->addHTML(
39 $relation->getRelationsParamDiagnostic($cfgRelation)