chk_rel.php 856 B

123456789101112131415161718192021222324252627282930313233343536
  1. <?php
  2. /* vim: set expandtab sw=4 ts=4 sts=4: */
  3. /**
  4. * Displays status of phpMyAdmin configuration storage
  5. *
  6. * @package PhpMyAdmin
  7. */
  8. use PhpMyAdmin\Relation;
  9. use PhpMyAdmin\Response;
  10. require_once 'libraries/common.inc.php';
  11. $relation = new Relation();
  12. // If request for creating the pmadb
  13. if (isset($_POST['create_pmadb'])) {
  14. if ($relation->createPmaDatabase()) {
  15. $relation->fixPmaTables('phpmyadmin');
  16. }
  17. }
  18. // If request for creating all PMA tables.
  19. if (isset($_POST['fixall_pmadb'])) {
  20. $relation->fixPmaTables($GLOBALS['db']);
  21. }
  22. $cfgRelation = $relation->getRelationsParam();
  23. // If request for creating missing PMA tables.
  24. if (isset($_POST['fix_pmadb'])) {
  25. $relation->fixPmaTables($cfgRelation['db']);
  26. }
  27. $response = Response::getInstance();
  28. $response->addHTML(
  29. $relation->getRelationsParamDiagnostic($cfgRelation)
  30. );