Share schema export code
This commit is contained in:
parent
75838f2412
commit
bb92cb2a26
@ -9,6 +9,8 @@ if (! defined('PHPMYADMIN')) {
|
||||
exit;
|
||||
}
|
||||
|
||||
require_once 'libraries/schema/Export_Relation_Schema.class.php';
|
||||
|
||||
/**
|
||||
* This Class interacts with the user to gather the information
|
||||
* about their tables for which they want to export the relational schema
|
||||
|
||||
@ -19,7 +19,7 @@ $cfgRelation = PMA_getRelationsParam();
|
||||
|
||||
require_once 'libraries/transformations.lib.php';
|
||||
require_once 'libraries/Index.class.php';
|
||||
require_once 'libraries/schema/Export_Relation_Schema.class.php';
|
||||
require_once 'libraries/schema/User_Schema.class.php';
|
||||
|
||||
/**
|
||||
* get all the export options and verify
|
||||
@ -49,19 +49,19 @@ foreach ($post_params as $one_post_param) {
|
||||
}
|
||||
}
|
||||
|
||||
if (! isset($export_type) || ! preg_match('/^[a-zA-Z]+$/', $export_type)) {
|
||||
$export_type = 'pdf';
|
||||
}
|
||||
$GLOBALS['dbi']->selectDb($db);
|
||||
include_once 'libraries/schema/User_Schema.class.php';
|
||||
$user_schema = new PMA_User_Schema();
|
||||
|
||||
$path = PMA_securePath(ucfirst($export_type));
|
||||
if (!file_exists('libraries/schema/' . $path . '_Relation_Schema.class.php')) {
|
||||
PMA_Export_Relation_Schema::dieSchema(
|
||||
$_POST['chpage'],
|
||||
$export_type,
|
||||
__('File doesn\'t exist')
|
||||
);
|
||||
/**
|
||||
* This function will process the user defined pages
|
||||
* and tables which will be exported as Relational schema
|
||||
* you can set the table positions on the paper via scratchboard
|
||||
* for table positions, put the x,y co-ordinates
|
||||
*
|
||||
* @param string $do It tells what the Schema is supposed to do
|
||||
* create and select a page, generate schema etc
|
||||
*/
|
||||
if (isset($_REQUEST['do'])) {
|
||||
$user_schema->setAction($_REQUEST['do']);
|
||||
$user_schema->processUserChoice();
|
||||
}
|
||||
require "libraries/schema/".$path.'_Relation_Schema.class.php';
|
||||
$obj_schema = eval("new PMA_".$path."_Relation_Schema();");
|
||||
$obj_schema->showOutput();
|
||||
|
||||
Loading…
Reference in New Issue
Block a user