From 0306e2bd887454fa4e200142416ea4dea2adbfd1 Mon Sep 17 00:00:00 2001 From: Atul Pratap Singh Date: Fri, 13 Jun 2014 11:20:27 +0530 Subject: [PATCH 1/2] Fix bug#4450 Query is duplicated on Ctrl+Enter Signed-off-by: Atul Pratap Singh --- js/functions.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/js/functions.js b/js/functions.js index 3a5e42ff84..6dc19e72ea 100644 --- a/js/functions.js +++ b/js/functions.js @@ -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 { From 531fff09fe4ba8ae50022edfb35d5b6f3fdb8281 Mon Sep 17 00:00:00 2001 From: Marc Delisle Date: Fri, 13 Jun 2014 07:42:14 -0400 Subject: [PATCH 2/2] bug #4405 Cannot import (open_basedir): fix another case Signed-off-by: Marc Delisle --- ChangeLog | 1 + import.php | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 52207aafcb..8269ec4236 100644 --- a/ChangeLog +++ b/ChangeLog @@ -7,6 +7,7 @@ phpMyAdmin - ChangeLog - bug #4445 Fatal error on SQL Export of join query - bug #4448 Dump binary columns in hexadecimal notation not working - Regenerate cookie encryption IV for every session +- bug #4405 Cannot import (open_basedir): fix another case 4.2.3.0 (2014-06-08) - bug #4423 Moving fields not working diff --git a/import.php b/import.php index 5c41ad4155..c8f7e2d92c 100644 --- a/import.php +++ b/import.php @@ -373,7 +373,10 @@ if ($import_file != 'none' && ! $error) { * @todo make use of the config's temp dir with fallback to the * system's tmp dir */ - $tmp_subdir = ini_get('upload_tmp_dir'); + $tmp_subdir = ini_get('upload_tmp_dir'); + if (empty($tmp_subdir)) { + $tmp_subdir = sys_get_temp_dir(); + } if (is_writable($tmp_subdir)) {