Skip to content

Commit

Permalink
Fix #11414 Unclear export options / organization / hierarchy
Browse files Browse the repository at this point in the history
Signed-off-by: Madhura Jayaratne <madhura.cj@gmail.com>
  • Loading branch information
madhuracj committed Aug 20, 2015
1 parent 5a94689 commit 769a8aa
Show file tree
Hide file tree
Showing 8 changed files with 21 additions and 49 deletions.
1 change: 1 addition & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ phpMyAdmin - ChangeLog
- issue #10726 Do not try to set port 80 for https requests
+ issue #11394 Export/import Designer view
+ Partition support in table Structure
+ issue #11414 Unclear export options / organization / hierarchy

4.4.14.0 (not yet released)
- issue #11367 Export after search, missing WHERE clause
Expand Down
1 change: 0 additions & 1 deletion export.php
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,6 @@
'sql_create_database',
'sql_drop_table',
'sql_procedure_function',
'sql_create_table_statements',
'sql_create_table',
'sql_create_view',
'sql_create_trigger',
Expand Down
13 changes: 0 additions & 13 deletions js/export.js
Original file line number Diff line number Diff line change
Expand Up @@ -539,19 +539,6 @@ function toggle_table_select(row) {
}

AJAX.registerOnload('export.js', function () {
/**
* For SQL plugin, if "CREATE TABLE options" is checked/unchecked, check/uncheck each of its sub-options
*/
var $create = $("#checkbox_sql_create_table_statements");
var $create_options = $("#ul_create_table_statements input");
$create.change(function () {
$create_options.prop('checked', $(this).prop("checked"));
});
$create_options.change(function () {
if ($create_options.is(":checked")) {
$create.prop('checked', true);
}
});

/**
* Disables the view output as text option if the output must be saved as a file
Expand Down
7 changes: 0 additions & 7 deletions libraries/config.default.php
Original file line number Diff line number Diff line change
Expand Up @@ -2086,13 +2086,6 @@
*/
$cfg['Export']['sql_header_comment'] = '';

/**
*
*
* @global boolean $cfg['Export']['sql_create_table_statements']
*/
$cfg['Export']['sql_create_table_statements'] = true;

/**
* Whether to use complete inserts, extended inserts, both, or neither
*
Expand Down
2 changes: 0 additions & 2 deletions libraries/config/messages.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -187,8 +187,6 @@
$strConfigExport_sql_backquotes_name
= __('Enclose table and column names with backquotes');
$strConfigExport_sql_compatibility_name = __('SQL compatibility mode');
$strConfigExport_sql_create_table_statements_name
= __('<code>CREATE TABLE</code> options:');
$strConfigExport_sql_dates_name = __('Creation/Update/Check dates');
$strConfigExport_sql_delayed_name = __('Use delayed inserts');
$strConfigExport_sql_disable_fk_name = __('Disable foreign key checks');
Expand Down
7 changes: 3 additions & 4 deletions libraries/config/setup.forms.php
Original file line number Diff line number Diff line change
Expand Up @@ -323,13 +323,12 @@
':group:' . __('Structure'),
'sql_drop_table',
'sql_procedure_function',
'sql_create_table',
'sql_create_view',
'sql_create_trigger',
'sql_create_table_statements' => ':group',
'sql_create_table' => ':group',
'sql_if_not_exists',
'sql_auto_increment',
':group:end',
'sql_create_view',
'sql_create_trigger',
'sql_backquotes',
':group:end',
':group:' . __('Data'),
Expand Down
9 changes: 4 additions & 5 deletions libraries/config/user_preferences.forms.php
Original file line number Diff line number Diff line change
Expand Up @@ -220,14 +220,13 @@
':group:end',
':group:' . __('Structure'),
'Export/sql_drop_table',
'Export/sql_create_table',
'Export/sql_create_view',
'Export/sql_procedure_function',
'Export/sql_create_trigger',
'Export/sql_create_table_statements' => ':group',
'Export/sql_create_table' => ':group',
'Export/sql_if_not_exists',
'Export/sql_auto_increment',
':group:end',
'Export/sql_create_view',
'Export/sql_procedure_function',
'Export/sql_create_trigger',
'Export/sql_backquotes',
':group:end',
':group:' . __('Data'),
Expand Down
30 changes: 13 additions & 17 deletions libraries/plugins/export/ExportSql.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -270,6 +270,19 @@ protected function setProperties()
);
$subgroup->addProperty($leaf);

$subgroup_create_table = new OptionsPropertySubgroup();
$subgroup_create_table->setSubgroupHeader($leaf);
$leaf = new BoolPropertyItem();
$leaf->setName('if_not_exists');
$leaf->setText('<code>IF NOT EXISTS</code>');
$subgroup_create_table->addProperty($leaf);
$leaf = new BoolPropertyItem();
$leaf->setName('auto_increment');
$leaf->setText('<code>AUTO_INCREMENT</code>');
$subgroup_create_table->addProperty($leaf);
$subgroup->addProperty($subgroup_create_table);
$structureOptions->addProperty($subgroup);

// Add view option
$leaf = new BoolPropertyItem();
$leaf->setName('create_view');
Expand Down Expand Up @@ -299,23 +312,6 @@ protected function setProperties()
);
$subgroup->addProperty($leaf);

// begin CREATE TABLE statements
$subgroup_create_table = new OptionsPropertySubgroup();
$leaf = new BoolPropertyItem();
$leaf->setName('create_table_statements');
$leaf->setText(__('<code>CREATE TABLE</code> options:'));
$subgroup_create_table->setSubgroupHeader($leaf);
$leaf = new BoolPropertyItem();
$leaf->setName('if_not_exists');
$leaf->setText('<code>IF NOT EXISTS</code>');
$subgroup_create_table->addProperty($leaf);
$leaf = new BoolPropertyItem();
$leaf->setName('auto_increment');
$leaf->setText('<code>AUTO_INCREMENT</code>');
$subgroup_create_table->addProperty($leaf);
$subgroup->addProperty($subgroup_create_table);
$structureOptions->addProperty($subgroup);

$leaf = new BoolPropertyItem();
$leaf->setName("backquotes");
$leaf->setText(
Expand Down

0 comments on commit 769a8aa

Please sign in to comment.