diff --git a/ChangeLog b/ChangeLog index c5622a139b..a336163e05 100644 --- a/ChangeLog +++ b/ChangeLog @@ -67,6 +67,7 @@ phpMyAdmin - ChangeLog - bug #3461750 [edit] Sort by key generates wrong sql with limit clause - bug #3340842 [structure] Error dropping index of non-existing column - bug #3093145 [display] Page through rows returned from a view ++ patch #3303195 [interface] Checkbox to have SQL input remain 3.4.10.0 (not yet released) - bug #3460090 [interface] TextareaAutoSelect feature broken diff --git a/js/sql.js b/js/sql.js index abd0be77d1..c1dc6dcf39 100644 --- a/js/sql.js +++ b/js/sql.js @@ -224,8 +224,10 @@ $(document).ready(function() { .html(data) .trigger('makegrid'); $('#togglequerybox').show(); - if ($("#togglequerybox").siblings(":visible").length > 0) { - $("#togglequerybox").trigger('click'); + if( $('#sqlqueryform input[name="retain_query_editor"]').is(':checked') != true ) { + if ($("#togglequerybox").siblings(":visible").length > 0) { + $("#togglequerybox").trigger('click'); + } } PMA_init_slider(); } diff --git a/libraries/config.default.php b/libraries/config.default.php index 94005b7713..7adb84cb3c 100644 --- a/libraries/config.default.php +++ b/libraries/config.default.php @@ -638,6 +638,13 @@ $cfg['SkipLockedTables'] = false; */ $cfg['ShowSQL'] = true; +/** + * retain SQL input on Ajax execute + * + * @global boolean $cfg['RetainQueryEditor'] + */ +$cfg['RetainQueryEditor'] = false; + /** * show a 'Drop database' link to normal users * diff --git a/libraries/sql_query_form.lib.php b/libraries/sql_query_form.lib.php index c358f0be2a..319dc9e4ee 100644 --- a/libraries/sql_query_form.lib.php +++ b/libraries/sql_query_form.lib.php @@ -344,6 +344,13 @@ function PMA_sqlQueryFormInsert($query = '', $is_querywindow = false, $delimiter .'' . "\n"; + echo '' + . ''; + echo '' . "\n"; echo '' ."\n";