diff --git a/index.php b/index.php index efee6c0972..291fdf24cc 100644 --- a/index.php +++ b/index.php @@ -133,6 +133,9 @@ if (isset($_GET['route']) || isset($_POST['route'])) { require_once ROOT_PATH . 'libraries/entry_points/preferences/twofactor.php'; }); }); + $routes->addRoute(['GET', 'POST'], '/schema_export', function () { + require_once ROOT_PATH . 'libraries/entry_points/schema_export.php'; + }); $routes->addGroup('/server', function (RouteCollector $routes) { $routes->addRoute(['GET', 'POST'], '/binlog', function () { require_once ROOT_PATH . 'libraries/entry_points/server/binlog.php'; diff --git a/schema_export.php b/libraries/entry_points/schema_export.php similarity index 84% rename from schema_export.php rename to libraries/entry_points/schema_export.php index 9f952bd34a..2461d3ef83 100644 --- a/schema_export.php +++ b/libraries/entry_points/schema_export.php @@ -11,14 +11,12 @@ use PhpMyAdmin\Export; use PhpMyAdmin\Relation; use PhpMyAdmin\Util; -if (! defined('ROOT_PATH')) { - define('ROOT_PATH', __DIR__ . DIRECTORY_SEPARATOR); +if (! defined('PHPMYADMIN')) { + exit; } global $containerBuilder; -require_once ROOT_PATH . 'libraries/common.inc.php'; - /** * get all variables needed for exporting relational schema * in $cfgRelation diff --git a/templates/database/designer/schema_export.twig b/templates/database/designer/schema_export.twig index 71f15f23cf..04bc626314 100644 --- a/templates/database/designer/schema_export.twig +++ b/templates/database/designer/schema_export.twig @@ -1,4 +1,4 @@ -
+
{{ get_hidden_inputs(db) }}