devilbox/.devilbox/www/htdocs/vendor/phpmyadmin-4.9.7/chk_rel.php

37 lines
856 B
PHP
Raw Normal View History

2016-10-22 14:57:10 +00:00
<?php
/* vim: set expandtab sw=4 ts=4 sts=4: */
/**
* Displays status of phpMyAdmin configuration storage
*
* @package PhpMyAdmin
*/
2018-04-14 09:18:00 +00:00
use PhpMyAdmin\Relation;
use PhpMyAdmin\Response;
2016-10-22 14:57:10 +00:00
require_once 'libraries/common.inc.php';
2018-04-14 09:18:00 +00:00
$relation = new Relation();
2016-10-22 14:57:10 +00:00
// If request for creating the pmadb
2018-12-16 14:31:03 +00:00
if (isset($_POST['create_pmadb'])) {
2018-04-14 09:18:00 +00:00
if ($relation->createPmaDatabase()) {
$relation->fixPmaTables('phpmyadmin');
2016-10-22 14:57:10 +00:00
}
}
// If request for creating all PMA tables.
2018-12-16 14:31:03 +00:00
if (isset($_POST['fixall_pmadb'])) {
2018-04-14 09:18:00 +00:00
$relation->fixPmaTables($GLOBALS['db']);
2016-10-22 14:57:10 +00:00
}
2018-04-14 09:18:00 +00:00
$cfgRelation = $relation->getRelationsParam();
2016-10-22 14:57:10 +00:00
// If request for creating missing PMA tables.
2018-12-16 14:31:03 +00:00
if (isset($_POST['fix_pmadb'])) {
2018-04-14 09:18:00 +00:00
$relation->fixPmaTables($cfgRelation['db']);
2016-10-22 14:57:10 +00:00
}
$response = Response::getInstance();
2016-10-22 14:57:10 +00:00
$response->addHTML(
2018-04-14 09:18:00 +00:00
$relation->getRelationsParamDiagnostic($cfgRelation)
2016-10-22 14:57:10 +00:00
);