From b054aa70ef443929484f087f459d4d856fcabaa5 Mon Sep 17 00:00:00 2001 From: Deven Bansod Date: Thu, 15 Sep 2016 12:10:17 +0530 Subject: [PATCH 1/2] Uncheck the Add CREATE PROCEDURE / FUNCTION etc. checkbox for a selective export User can always check it if he/she wants to export the procs,funcs etc. too Signed-off-by: Deven Bansod --- js/export.js | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/js/export.js b/js/export.js index 762ba4166e..09fedd2af0 100644 --- a/js/export.js +++ b/js/export.js @@ -540,6 +540,16 @@ function toggle_table_select(row) { } } +function handleAddProcCheckbox() { + if ($('#table_structure_all').is(':checked') === true + && $('#table_data_all').is(':checked') === true + ) { + $('#checkbox_sql_procedure_function').prop('checked', true); + } else { + $('#checkbox_sql_procedure_function').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 @@ -579,26 +589,31 @@ AJAX.registerOnload('export.js', function () { $('input[name="table_select[]"]').on('change', function() { toggle_table_select($(this).closest('tr')); check_table_select_all(); + handleAddProcCheckbox(); }); $('input[name="table_structure[]"]').on('change', function() { check_table_selected($(this).closest('tr')); check_table_select_all(); + handleAddProcCheckbox(); }); $('input[name="table_data[]"]').on('change', function() { check_table_selected($(this).closest('tr')); check_table_select_all(); + handleAddProcCheckbox(); }); $('#table_structure_all').on('change', function() { toggle_table_select_all_str(); check_selected_tables(); + handleAddProcCheckbox(); }); $('#table_data_all').on('change', function() { toggle_table_select_all_data(); check_selected_tables(); + handleAddProcCheckbox(); }); if ($("input[name='export_type']").val() == 'database') { @@ -805,6 +820,8 @@ AJAX.registerOnload('export.js', function () { toggle_quick_or_custom(); toggle_structure_data_opts(); toggle_sql_include_comments(); + check_table_select_all(); + handleAddProcCheckbox(); /** * Initially disables the "Dump some row(s)" sub-options From 4f1432eb2fe6a25efbf740c9f712d4454e109969 Mon Sep 17 00:00:00 2001 From: Deven Bansod Date: Fri, 16 Sep 2016 13:57:26 +0530 Subject: [PATCH 2/2] ChangeLog entry for #12300 Signed-off-by: Deven Bansod Conflicts: ChangeLog --- ChangeLog | 1 + 1 file changed, 1 insertion(+) diff --git a/ChangeLog b/ChangeLog index 703d330f71..e5e32418c5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -30,6 +30,7 @@ phpMyAdmin - ChangeLog - issue #12473 Code can throw unhandled exception - issue #12550 Do not try to keep alive session even after expiry - issue #12512 Fixed rendering BBCode links in setup +- issue #12300 Export selective tables by-default dumps Events also 4.6.4 (2016-08-16) - issue [security] Weaknesses with cookie encryption, see PMASA-2016-29