You've already forked phpmyadmin
mirror of
https://github.com/phpmyadmin/phpmyadmin.git
synced 2026-11-01 23:14:58 +03:00
Fix bug#4450 Query is duplicated on Ctrl+Enter
Signed-off-by: Atul Pratap Singh <atulpratapsingh05@gmail.com>
This commit is contained in:
@@ -387,13 +387,13 @@ function confirmQuery(theForm1, sqlQuery1)
|
||||
*/
|
||||
function checkSqlQuery(theForm)
|
||||
{
|
||||
var sqlQuery;
|
||||
// get the textarea element containing the query
|
||||
if (codemirror_editor) {
|
||||
codemirror_editor.save();
|
||||
var sqlQuery = codemirror_editor.display.input;
|
||||
sqlQuery.value = codemirror_editor.getValue();
|
||||
sqlQuery = codemirror_editor.getValue();
|
||||
} else {
|
||||
var sqlQuery = theForm.elements['sql_query'];
|
||||
sqlQuery = theForm.elements.sql_query.value;
|
||||
}
|
||||
var isEmpty = 1;
|
||||
var space_re = new RegExp('\\s+');
|
||||
@@ -411,7 +411,7 @@ function checkSqlQuery(theForm)
|
||||
return true;
|
||||
}
|
||||
// Checks for "DROP/DELETE/ALTER" statements
|
||||
if (sqlQuery.value.replace(space_re, '') !== '') {
|
||||
if (sqlQuery.replace(space_re, '') !== '') {
|
||||
if (confirmQuery(theForm, sqlQuery)) {
|
||||
return true;
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user