Translated using Weblate (Turkish)
[phpmyadmin.git] / chk_rel.php
blob245591735e15dd6da7e444ddef31017cce05230a
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\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']);
45 $response->addHTML(
46 $relation->getRelationsParamDiagnostic($cfgRelation)