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:
authorMichal Čihař <michal@cihar.com>2016-10-04 18:25:00 +0300
committerMichal Čihař <michal@cihar.com>2016-10-04 18:25:00 +0300
commitd753aaaa9b9030c7088e53cb1bbd0c5a2697974a (patch)
tree15414e6d7bb8c4330fcb0a132ee9e4ea9a34e6f6 /import.php
parentad39140c8691cdaee2607b593d2b8755298dff1e (diff)
parent3f0122b6f45d682d3e35b5fe672910f68d3c10bf (diff)
Merge branch 'master' into master-security
Diffstat (limited to 'import.php')
-rw-r--r--import.php20
1 files changed, 18 insertions, 2 deletions
diff --git a/import.php b/import.php
index 3d4188d370..6d31c5a2a4 100644
--- a/import.php
+++ b/import.php
@@ -203,7 +203,10 @@ if ($_POST == array() && $_GET == array()) {
$_SESSION['Import_message']['message'] = $message->getDisplay();
$_SESSION['Import_message']['go_back_url'] = $GLOBALS['goto'];
- $message->display();
+ $response = PMA\libraries\Response::getInstance();
+ $response->setRequestStatus(false);
+ $response->addJSON('message', $message);
+
exit; // the footer is displayed automatically
}
@@ -679,6 +682,7 @@ if ($go_sql) {
}
$html_output = '';
+
foreach ($sql_queries as $sql_query) {
// parse sql query
@@ -714,7 +718,7 @@ if ($go_sql) {
$db, // db
$table, // table
null, // find_real_end
- $_REQUEST['sql_query'], // sql_query_for_bookmark
+ null, // sql_query_for_bookmark - see below
null, // extra_data
null, // message_to_show
null, // message
@@ -730,6 +734,18 @@ if ($go_sql) {
);
}
+ // sql_query_for_bookmark is not included in PMA_executeQueryAndGetQueryResponse
+ // since only one bookmark has to be added for all the queries submitted through
+ // the SQL tab
+ if (! empty($_POST['bkm_label']) && ! empty($import_text)) {
+ $cfgBookmark = PMA_Bookmark_getParams();
+ PMA_storeTheQueryAsBookmark(
+ $db, $cfgBookmark['user'],
+ $_REQUEST['sql_query'], $_POST['bkm_label'],
+ isset($_POST['bkm_replace']) ? $_POST['bkm_replace'] : null
+ );
+ }
+
$response = PMA\libraries\Response::getInstance();
$response->addJSON('ajax_reload', $ajax_reload);
$response->addHTML($html_output);