Merge branch 'origin/master' into Weblate.
[phpmyadmin.git] / schema_export.php
blobb6a5a30282f8ba50b43501f0365c937026705612
1 <?php
2 /* vim: set expandtab sw=4 ts=4 sts=4: */
3 /**
4 * Schema export handler
6 * @package PhpMyAdmin
7 */
8 declare(strict_types=1);
10 use PhpMyAdmin\Export;
11 use PhpMyAdmin\Relation;
12 use PhpMyAdmin\Util;
14 if (! defined('ROOT_PATH')) {
15 define('ROOT_PATH', __DIR__ . DIRECTORY_SEPARATOR);
18 /**
19 * Gets some core libraries
21 require_once ROOT_PATH . 'libraries/common.inc.php';
23 /**
24 * get all variables needed for exporting relational schema
25 * in $cfgRelation
27 $relation = new Relation($GLOBALS['dbi']);
28 $cfgRelation = $relation->getRelationsParam();
30 if (! isset($_REQUEST['export_type'])) {
31 Util::checkParameters(['export_type']);
34 /**
35 * Include the appropriate Schema Class depending on $export_type
36 * default is PDF
38 $export = new Export();
39 $export->processExportSchema($_REQUEST['export_type']);