Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/phpmyadmin/phpmyadmin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog1
-rw-r--r--db_export.php84
-rw-r--r--export.php24
-rw-r--r--js/export.js244
-rw-r--r--js/functions.js1
-rw-r--r--libraries/display_export.lib.php18
-rw-r--r--libraries/export.lib.php40
-rw-r--r--themes/original/css/common.css.php24
-rw-r--r--themes/pmahomme/css/common.css.php24
9 files changed, 388 insertions, 72 deletions
diff --git a/ChangeLog b/ChangeLog
index 98d7ebba29..19d8159437 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -69,6 +69,7 @@ phpMyAdmin - ChangeLog
+ rfe #1531 Cant use external config file
+ rfe #1552 CSV import: Allow "Columns escaped with" to be optional
+ rfe #1561 Being able to use multiple servers at the same time when using cookie auth
++ rfe #1603 select structure or data for each table when exporting
4.4.11.0 (not yet released)
- bug Missing selected/entered values when editing active options in visual query builder
diff --git a/db_export.php b/db_export.php
index 40831f4ba0..f33b97266d 100644
--- a/db_export.php
+++ b/db_export.php
@@ -37,21 +37,25 @@ if ($num_tables < 1) {
exit;
} // end if
-$multi_values = '<div>';
-$multi_values .= '<a href="#"';
-$multi_values .= ' onclick="setSelectOptions(\'dump\', \'table_select[]\', true);'
- . ' return false;">';
-$multi_values .= __('Select All');
-$multi_values .= '</a>';
-$multi_values .= ' / ';
-$multi_values .= '<a href="#"';
-$multi_values .= ' onclick="setSelectOptions(\'dump\', \'table_select[]\', false);'
- . ' return false;">';
-$multi_values .= __('Unselect All');
-$multi_values .= '</a><br />';
-
-$multi_values .= '<select name="table_select[]" id="table_select" size="10"'
- . ' multiple="multiple">';
+$multi_values = '<div class="export_table_list_container">';
+if (isset($_GET['structure_or_data_forced'])) {
+ $force_val = htmlspecialchars($_GET['structure_or_data_forced']);
+} else {
+ $force_val = 0;
+}
+$multi_values .= '<input type="hidden" name="structure_or_data_forced" value="' . $force_val . '">';
+$multi_values .= '<table class="export_table_select">'
+ . '<thead><tr><th></th>'
+ . '<th>' . __('Tables') . '</th>'
+ . '<th class="export_structure">' . __('Structure') . '</th>'
+ . '<th class="export_data">' . __('Data') . '</th>'
+ . '</tr><tr>'
+ . '<td></td>'
+ . '<td class="export_table_name all">' . __('Select all') . '</td>'
+ . '<td class="export_structure all"><input type="checkbox" id="table_structure_all" /></td>'
+ . '<td class="export_data all"><input type="checkbox" id="table_data_all" /></td>'
+ . '</tr></thead>'
+ . '<tbody>';
$multi_values .= "\n";
// when called by libraries/mult_submits.inc.php
@@ -65,31 +69,63 @@ if (isset($_GET['table_select'])) {
$_GET['table_select'] = urldecode($_GET['table_select']);
$_GET['table_select'] = explode(",", $_GET['table_select']);
}
+if (isset($_GET['table_structure'])) {
+ $_GET['table_structure'] = urldecode($_GET['table_structure']);
+ $_GET['table_structure'] = explode(",", $_GET['table_structure']);
+}
+if (isset($_GET['table_data'])) {
+ $_GET['table_data'] = urldecode($_GET['table_data']);
+ $_GET['table_data'] = explode(",", $_GET['table_data']);
+}
foreach ($tables as $each_table) {
if (isset($_GET['table_select'])) {
if (in_array($each_table['Name'], $_GET['table_select'])) {
- $is_selected = ' selected="selected"';
+ $is_checked = ' checked="checked"';
} else {
- $is_selected = '';
+ $is_checked = '';
}
} elseif (isset($table_select)) {
if (in_array($each_table['Name'], $table_select)) {
- $is_selected = ' selected="selected"';
+ $is_checked = ' checked="checked"';
+ } else {
+ $is_checked = '';
+ }
+ } else {
+ $is_checked = ' checked="checked"';
+ }
+ if (isset($_GET['table_structure'])) {
+ if (in_array($each_table['Name'], $_GET['table_structure'])) {
+ $str_checked = ' checked="checked"';
+ } else {
+ $str_checked = '';
+ }
+ } else {
+ $str_checked = $is_checked;
+ }
+ if (isset($_GET['table_data'])) {
+ if (in_array($each_table['Name'], $_GET['table_data'])) {
+ $data_checked = ' checked="checked"';
} else {
- $is_selected = '';
+ $data_checked = '';
}
} else {
- $is_selected = ' selected="selected"';
+ $data_checked = $is_checked;
}
$table_html = htmlspecialchars($each_table['Name']);
- $multi_values .= ' <option value="' . $table_html . '"'
- . $is_selected . '>'
- . str_replace(' ', '&nbsp;', $table_html) . '</option>' . "\n";
+ $multi_values .= '<tr>';
+ $multi_values .= '<td><input type="checkbox" name="table_select[]"'
+ . ' value="' . $table_html . '"' . $is_checked . ' /></td>';
+ $multi_values .= '<td class="export_table_name">' . str_replace(' ', '&nbsp;', $table_html) . '</td>';
+ $multi_values .= '<td class="export_structure"><input type="checkbox" name="table_structure[]"'
+ . ' value="' . $table_html . '"' . $str_checked . ' /></td>';
+ $multi_values .= '<td class="export_data"><input type="checkbox" name="table_data[]"'
+ . ' value="' . $table_html . '"' . $data_checked . ' /></td>';
+ $multi_values .= '</tr>';
} // end for
$multi_values .= "\n";
-$multi_values .= '</select></div>';
+$multi_values .= '</tbody></table></div>';
$export_type = 'database';
require_once 'libraries/display_export.inc.php';
diff --git a/export.php b/export.php
index f26bc65d2c..3f51002a34 100644
--- a/export.php
+++ b/export.php
@@ -49,6 +49,8 @@ if (!defined('TESTSUITE')) {
'quick_or_custom',
'db_select',
'table_select',
+ 'table_structure',
+ 'table_data',
'limit_to',
'limit_from',
'allrows',
@@ -432,13 +434,23 @@ if (!defined('TESTSUITE')) {
$aliases, $separate_files
);
} elseif ($export_type == 'database') {
+ if (!isset($table_structure) || !is_array($table_structure)) {
+ $table_structure = array();
+ }
+ if (!isset($table_data) || !is_array($table_data)) {
+ $table_data = array();
+ }
+ if (!empty($_REQUEST['structure_or_data_forced'])) {
+ $table_structure = $tables;
+ $table_data = $tables;
+ }
if (isset($lock_tables)) {
PMA_lockTables($db, $tables, "READ");
try {
PMA_exportDatabase(
- $db, $tables, $whatStrucOrData, $export_plugin, $crlf,
- $err_url, $export_type, $do_relation, $do_comments,
- $do_mime, $do_dates, $aliases, $separate_files
+ $db, $tables, $whatStrucOrData, $table_structure, $table_data,
+ $export_plugin, $crlf, $err_url, $export_type, $do_relation,
+ $do_comments, $do_mime, $do_dates, $aliases, $separate_files
);
PMA_unlockTables();
} catch (Exception $e) { // TODO use finally when PHP version is 5.5
@@ -447,9 +459,9 @@ if (!defined('TESTSUITE')) {
}
} else {
PMA_exportDatabase(
- $db, $tables, $whatStrucOrData, $export_plugin, $crlf, $err_url,
- $export_type, $do_relation, $do_comments, $do_mime, $do_dates,
- $aliases, $separate_files
+ $db, $tables, $whatStrucOrData, $table_structure, $table_data,
+ $export_plugin, $crlf, $err_url, $export_type, $do_relation,
+ $do_comments, $do_mime, $do_dates, $aliases, $separate_files
);
}
} else {
diff --git a/js/export.js b/js/export.js
index c97e72d94c..470526b4db 100644
--- a/js/export.js
+++ b/js/export.js
@@ -32,19 +32,19 @@ function enable_dump_some_rows_sub_options()
AJAX.registerTeardown('export.js', function () {
$("#plugins").unbind('change');
$("input[type='radio'][name='sql_structure_or_data']").unbind('change');
- $("input[type='radio'][name='latex_structure_or_data']").unbind('change');
- $("input[type='radio'][name='odt_structure_or_data']").unbind('change');
- $("input[type='radio'][name='texytext_structure_or_data']").unbind('change');
- $("input[type='radio'][name='htmlword_structure_or_data']").unbind('change');
- $("input[type='radio'][name='sql_structure_or_data']").unbind('change');
+ $("input[type='radio'][name$='_structure_or_data']").off('change');
$("input[type='radio'][name='output_format']").unbind('change');
$("#checkbox_sql_include_comments").unbind('change');
- $("#plugins").unbind('change');
$("input[type='radio'][name='quick_or_custom']").unbind('change');
$("input[type='radio'][name='allrows']").unbind('change');
$('#btn_alias_config').off('click');
$('#db_alias_select').off('change');
$('.table_alias_select').off('change');
+ $('input[name="table_select[]"]').off('change');
+ $('input[name="table_structure[]"]').off('change');
+ $('input[name="table_data[]"]').off('change');
+ $('#table_structure_all').off('change');
+ $('#table_data_all').off('change');
});
AJAX.registerOnload('export.js', function () {
@@ -99,15 +99,66 @@ AJAX.registerOnload('export.js', function () {
$('input[type="checkbox"][name="as_separate_files"]').attr('checked', false);
}
});
+
});
+function setup_table_structure_or_data() {
+ if ($("input[name='export_type']").val() != 'database') {
+ return;
+ }
+ var pluginName = $("#plugins option:selected").val();
+ var formElemName = pluginName + "_structure_or_data";
+ var force_structure_or_data = !($("input[name='" + formElemName + "_default']").length);
+
+ if (force_structure_or_data === true) {
+ $('input[name="structure_or_data_forced"]').val(1);
+ $('.export_structure input[type="checkbox"], .export_data input[type="checkbox"]')
+ .prop('disabled', true);
+ $('.export_structure, .export_data').fadeTo('fast', 0.4);
+ } else {
+ $('input[name="structure_or_data_forced"]').val(0);
+ $('.export_structure input[type="checkbox"], .export_data input[type="checkbox"]')
+ .removeProp('disabled');
+ $('.export_structure, .export_data').fadeTo('fast', 1);
+
+ var structure_or_data = $('input[name="' + formElemName + '_default"]').val();
+
+ if (structure_or_data == 'structure') {
+ $('.export_data input[type="checkbox"]')
+ .prop('checked', false);
+ } else if (structure_or_data == 'data') {
+ $('.export_structure input[type="checkbox"]')
+ .prop('checked', false);
+ }
+ if (structure_or_data == 'structure' || structure_or_data == 'structure_and_data') {
+ if (!$('.export_structure input[type="checkbox"]:checked').length) {
+ $('input[name="table_select[]"]:checked')
+ .closest('tr')
+ .find('.export_structure input[type="checkbox"]')
+ .prop('checked', true);
+ }
+ }
+ if (structure_or_data == 'data' || structure_or_data == 'structure_and_data') {
+ if (!$('.export_data input[type="checkbox"]:checked').length) {
+ $('input[name="table_select[]"]:checked')
+ .closest('tr')
+ .find('.export_data input[type="checkbox"]')
+ .prop('checked', true);
+ }
+ }
+
+ check_selected_tables();
+ check_table_select_all();
+ }
+}
/**
* Toggles the hiding and showing of plugin structure-specific and data-specific
* options
*/
-function toggle_structure_data_opts(pluginName)
+function toggle_structure_data_opts()
{
+ var pluginName = $("select#plugins").val();
var radioFormName = pluginName + "_structure_or_data";
var dataDiv = "#" + pluginName + "_data";
var structureDiv = "#" + pluginName + "_structure";
@@ -125,24 +176,6 @@ function toggle_structure_data_opts(pluginName)
}
}
-AJAX.registerOnload('export.js', function () {
- $("input[type='radio'][name='latex_structure_or_data']").change(function () {
- toggle_structure_data_opts("latex");
- });
- $("input[type='radio'][name='odt_structure_or_data']").change(function () {
- toggle_structure_data_opts("odt");
- });
- $("input[type='radio'][name='texytext_structure_or_data']").change(function () {
- toggle_structure_data_opts("texytext");
- });
- $("input[type='radio'][name='htmlword_structure_or_data']").change(function () {
- toggle_structure_data_opts("htmlword");
- });
- $("input[type='radio'][name='sql_structure_or_data']").change(function () {
- toggle_structure_data_opts("sql");
- });
-});
-
/**
* Toggles the disabling of the "save to file" options
*/
@@ -185,6 +218,93 @@ function toggle_sql_include_comments()
});
}
+function check_table_select_all() {
+ var total = $('input[name="table_select[]"]').length;
+ var str_checked = $('input[name="table_structure[]"]:checked').length;
+ var data_checked = $('input[name="table_data[]"]:checked').length;
+ var str_all = $('#table_structure_all');
+ var data_all = $('#table_data_all');
+
+ if (str_checked == total) {
+ str_all
+ .prop("indeterminate", false)
+ .prop('checked', true);
+ } else if (str_checked === 0) {
+ str_all
+ .prop("indeterminate", false)
+ .prop('checked', false);
+ } else {
+ str_all
+ .prop("indeterminate", true)
+ .prop('checked', false);
+ }
+
+ if (data_checked == total) {
+ data_all
+ .prop("indeterminate", false)
+ .prop('checked', true);
+ } else if (data_checked === 0) {
+ data_all
+ .prop("indeterminate", false)
+ .prop('checked', false);
+ } else {
+ data_all
+ .prop("indeterminate", true)
+ .prop('checked', false);
+ }
+}
+
+function toggle_table_select_all_str() {
+ var str_all = $('#table_structure_all').is(':checked');
+ if (str_all) {
+ $('input[name="table_structure[]"]').prop('checked', true);
+ } else {
+ $('input[name="table_structure[]"]').prop('checked', false);
+ }
+}
+
+function toggle_table_select_all_data() {
+ var data_all = $('#table_data_all').is(':checked');
+ if (data_all) {
+ $('input[name="table_data[]"]').prop('checked', true);
+ } else {
+ $('input[name="table_data[]"]').prop('checked', false);
+ }
+}
+
+function check_selected_tables(argument) {
+ $('.export_table_select tbody tr').each(function() {
+ check_table_selected(this);
+ });
+}
+
+function check_table_selected(row) {
+ var $row = $(row);
+ var table_select = $row.find('input[name="table_select[]"]');
+ var str_check = $row.find('input[name="table_structure[]"]');
+ var data_check = $row.find('input[name="table_data[]"]');
+
+ var data = data_check.is(':checked:not(:disabled)');
+ var structure = str_check.is(':checked:not(:disabled)');
+
+ if (data || structure) {
+ table_select.prop('checked', true);
+ } else {
+ table_select.prop('checked', false);
+ }
+}
+
+function toggle_table_select(row) {
+ var $row = $(row);
+ var table_selected = $row.find('input[name="table_select[]"]').is(':checked');
+
+ if (table_selected) {
+ $row.find('input[type="checkbox"]:not(:disabled)').prop('checked', true);
+ } else {
+ $row.find('input[type="checkbox"]:not(:disabled)').prop('checked', false);
+ }
+}
+
AJAX.registerOnload('export.js', function () {
/**
* For SQL plugin, if "CREATE TABLE options" is checked/unchecked, check/uncheck each of its sub-options
@@ -216,6 +336,78 @@ AJAX.registerOnload('export.js', function () {
$("#radio_view_as_text").prop('disabled', false).parent().fadeTo('fast', 1);
}
});
+
+ $("input[type='radio'][name$='_structure_or_data']").on('change', function () {
+ toggle_structure_data_opts();
+ });
+
+ $('input[name="table_select[]"]').on('change', function() {
+ toggle_table_select($(this).closest('tr'));
+ check_table_select_all();
+ });
+
+ $('input[name="table_structure[]"]').on('change', function() {
+ check_table_selected($(this).closest('tr'));
+ check_table_select_all();
+ });
+
+ $('input[name="table_data[]"]').on('change', function() {
+ check_table_selected($(this).closest('tr'));
+ check_table_select_all();
+ });
+
+ $('#table_structure_all').on('change', function() {
+ toggle_table_select_all_str();
+ check_selected_tables();
+ });
+
+ $('#table_data_all').on('change', function() {
+ toggle_table_select_all_data();
+ check_selected_tables();
+ });
+
+ if ($("input[name='export_type']").val() == 'database') {
+ // Hide structure or data radio buttons
+ $("input[type='radio'][name$='_structure_or_data']").each(function() {
+ var $this = $(this);
+ var name = $this.prop('name');
+ var val = $('input[name="' + name + '"]:checked').val();
+ var name_default = name + '_default';
+ if (!$('input[name="' + name_default + '"]').length) {
+ $this
+ .after(
+ $('<input type="hidden" name="' + name_default + '" value="' + val + '" disabled>')
+ )
+ .after(
+ $('<input type="hidden" name="' + name + '" value="structure_and_data">')
+ );
+ $this.parent().find('label').remove();
+ } else {
+ $this.parent().remove();
+ }
+ });
+ $("input[type='radio'][name$='_structure_or_data']").remove();
+
+ // Disable CREATE table checkbox for sql
+ var createTableCheckbox = $('#checkbox_sql_create_table');
+ createTableCheckbox.prop('checked', true);
+ var dummyCreateTable = $('#checkbox_sql_create_table')
+ .clone()
+ .removeAttr('id')
+ .attr('type', 'hidden');
+ createTableCheckbox
+ .prop('disabled', true)
+ .after(dummyCreateTable)
+ .parent()
+ .fadeTo('fast', 0.4);
+
+ setup_table_structure_or_data();
+ }
+
+ /**
+ * Handle force structure_or_data
+ */
+ $("#plugins").change(setup_table_structure_or_data);
});
/**
@@ -376,7 +568,7 @@ AJAX.registerOnload('export.js', function () {
.find("h3")
.remove();
toggle_quick_or_custom();
- toggle_structure_data_opts($("select#plugins").val());
+ toggle_structure_data_opts();
toggle_sql_include_comments();
/**
diff --git a/js/functions.js b/js/functions.js
index 9abea8f885..3fb41961cf 100644
--- a/js/functions.js
+++ b/js/functions.js
@@ -1744,7 +1744,6 @@ AJAX.registerTeardown('functions.js', function () {
$(document).off('blur', '#sqlquery');
}
$(document).off('change', '#parameterized');
- $("#export_type").unbind('change');
$('#sqlquery').unbind('keydown');
$('#sql_query_edit').unbind('keydown');
diff --git a/libraries/display_export.lib.php b/libraries/display_export.lib.php
index f9baf99779..15aa2dfd9d 100644
--- a/libraries/display_export.lib.php
+++ b/libraries/display_export.lib.php
@@ -260,20 +260,31 @@ function PMA_getHtmlForExportOptionsSelection($export_type, $multi_values)
}
/**
- * Prints Html For Export Options Format
+ * Prints Html For Export Options Format dropdown
*
* @param ExportPlugin[] $export_list Export List
*
* @return string
*/
-function PMA_getHtmlForExportOptionsFormat($export_list)
+function PMA_getHtmlForExportOptionsFormatDropdown($export_list)
{
$html = '<div class="exportoptions" id="format">';
$html .= '<h3>' . __('Format:') . '</h3>';
$html .= PMA_pluginGetChoice('Export', 'what', $export_list, 'format');
$html .= '</div>';
+ return $html;
+}
- $html .= '<div class="exportoptions" id="format_specific_opts">';
+/**
+ * Prints Html For Export Options Format-specific options
+ *
+ * @param ExportPlugin[] $export_list Export List
+ *
+ * @return string
+ */
+function PMA_getHtmlForExportOptionsFormat($export_list)
+{
+ $html = '<div class="exportoptions" id="format_specific_opts">';
$html .= '<h3>' . __('Format-specific options:') . '</h3>';
$html .= '<p class="no_js_msg" id="scroll_to_options_msg">';
$html .= __(
@@ -760,6 +771,7 @@ function PMA_getHtmlForExportOptions(
global $cfg;
$html = PMA_getHtmlForExportOptionHeader($export_type, $db, $table);
$html .= PMA_getHtmlForExportOptionsMethod();
+ $html .= PMA_getHtmlForExportOptionsFormatDropdown($export_list);
$html .= PMA_getHtmlForExportOptionsSelection($export_type, $multi_values);
$tableLength = /*overload*/mb_strlen($table);
diff --git a/libraries/export.lib.php b/libraries/export.lib.php
index 23bc0ba151..d219a33991 100644
--- a/libraries/export.lib.php
+++ b/libraries/export.lib.php
@@ -491,10 +491,20 @@ function PMA_getHtmlForDisplayedExportHeader($export_type, $db, $table)
// Convert the multiple select elements from an array to a string
if ($export_type == 'server' && isset($_REQUEST['db_select'])) {
$_REQUEST['db_select'] = implode(",", $_REQUEST['db_select']);
- } elseif ($export_type == 'database'
- && isset($_REQUEST['table_select'])
- ) {
- $_REQUEST['table_select'] = implode(",", $_REQUEST['table_select']);
+ } elseif ($export_type == 'database') {
+ if (isset($_REQUEST['table_select'])) {
+ $_REQUEST['table_select'] = implode(",", $_REQUEST['table_select']);
+ }
+ if (isset($_REQUEST['table_structure'])) {
+ $_REQUEST['table_structure'] = implode(",", $_REQUEST['table_structure']);
+ } else if (empty($_REQUEST['structure_or_data_forced'])) {
+ $_REQUEST['table_structure'] = '';
+ }
+ if (isset($_REQUEST['table_data'])) {
+ $_REQUEST['table_data'] = implode(",", $_REQUEST['table_data']);
+ } else if (empty($_REQUEST['structure_or_data_forced'])) {
+ $_REQUEST['table_data'] = '';
+ }
}
foreach ($_REQUEST as $name => $value) {
@@ -546,9 +556,10 @@ function PMA_exportServer(
) {
$tables = $GLOBALS['dbi']->getTables($current_db);
PMA_exportDatabase(
- $current_db, $tables, $whatStrucOrData, $export_plugin, $crlf,
- $err_url, $export_type, $do_relation, $do_comments, $do_mime,
- $do_dates, $aliases, $separate_files == 'database' ? $separate_files : ''
+ $current_db, $tables, $whatStrucOrData, $tables, $tables,
+ $export_plugin, $crlf, $err_url, $export_type, $do_relation,
+ $do_comments, $do_mime, $do_dates, $aliases,
+ $separate_files == 'database' ? $separate_files : ''
);
if ($separate_files == 'server') {
PMA_saveObjectInBuffer($current_db);
@@ -563,6 +574,8 @@ function PMA_exportServer(
* @param string $db the database to export
* @param array $tables the tables to export
* @param string $whatStrucOrData structure or data or both
+ * @param array $table_structure whether to export structure for each table
+ * @param array $table_data whether to export data for each table
* @param ExportPlugin $export_plugin the selected export plugin
* @param string $crlf end of line character(s)
* @param string $err_url the URL in case of error
@@ -577,9 +590,9 @@ function PMA_exportServer(
* @return void
*/
function PMA_exportDatabase(
- $db, $tables, $whatStrucOrData, $export_plugin, $crlf, $err_url,
- $export_type, $do_relation, $do_comments, $do_mime, $do_dates,
- $aliases, $separate_files
+ $db, $tables, $whatStrucOrData, $table_structure, $table_data,
+ $export_plugin, $crlf, $err_url, $export_type, $do_relation,
+ $do_comments, $do_mime, $do_dates, $aliases, $separate_files
) {
$db_alias = !empty($aliases[$db]['alias'])
? $aliases[$db]['alias'] : '';
@@ -630,8 +643,9 @@ function PMA_exportDatabase(
if ($is_view) {
$views[] = $table;
}
- if ($whatStrucOrData == 'structure'
- || $whatStrucOrData == 'structure_and_data'
+ if (($whatStrucOrData == 'structure'
+ || $whatStrucOrData == 'structure_and_data')
+ && in_array($table, $table_structure)
) {
// for a view, export a stand-in definition of the table
// to resolve view dependencies (only when it's a single-file export)
@@ -681,6 +695,7 @@ function PMA_exportDatabase(
// if this is a view or a merge table, don't export data
if (($whatStrucOrData == 'data'
|| $whatStrucOrData == 'structure_and_data')
+ && in_array($table, $table_data)
&& ! ($is_view || PMA_Table::isMerge($db, $table))
) {
$local_query = 'SELECT * FROM ' . PMA_Util::backquote($db)
@@ -700,6 +715,7 @@ function PMA_exportDatabase(
// triggers can modify already imported tables)
if (isset($GLOBALS['sql_create_trigger']) && ($whatStrucOrData == 'structure'
|| $whatStrucOrData == 'structure_and_data')
+ && in_array($table, $table_structure)
) {
if (! $export_plugin->exportStructure(
$db, $table, $crlf, $err_url, 'triggers',
diff --git a/themes/original/css/common.css.php b/themes/original/css/common.css.php
index aa91a0e9a2..4f1300f188 100644
--- a/themes/original/css/common.css.php
+++ b/themes/original/css/common.css.php
@@ -1508,6 +1508,30 @@ select.invalid_value,
* Export and Import styles
*/
+.export_table_list_container {
+ display: inline-block;
+ max-height: 20em;
+ overflow-y: scroll;
+}
+
+.export_table_select th {
+ text-align: center;
+ vertical-align: middle;
+}
+
+.export_table_select .all {
+ font-weight: bold;
+ border-bottom: 1px solid black;
+}
+
+.export_structure, .export_data {
+ text-align: center;
+}
+
+.export_table_name {
+ vertical-align: middle;
+}
+
.exportoptions h3, .importoptions h3 {
border-bottom: 1px #999999 solid;
font-size: 110%;
diff --git a/themes/pmahomme/css/common.css.php b/themes/pmahomme/css/common.css.php
index 2c07b72768..815ffbfb40 100644
--- a/themes/pmahomme/css/common.css.php
+++ b/themes/pmahomme/css/common.css.php
@@ -1994,6 +1994,30 @@ select.invalid_value,
* Export and Import styles
*/
+.export_table_list_container {
+ display: inline-block;
+ max-height: 20em;
+ overflow-y: scroll;
+}
+
+.export_table_select th {
+ text-align: center;
+ vertical-align: middle;
+}
+
+.export_table_select .all {
+ font-weight: bold;
+ border-bottom: 1px solid black;
+}
+
+.export_structure, .export_data {
+ text-align: center;
+}
+
+.export_table_name {
+ vertical-align: middle;
+}
+
.exportoptions h3,
.importoptions h3 {
border-bottom: 1px #999 solid;