diff options
author | Marc Delisle <marc@infomarc.info> | 2011-09-20 20:45:19 +0400 |
---|---|---|
committer | Marc Delisle <marc@infomarc.info> | 2011-09-20 20:45:19 +0400 |
commit | 369c9c550a82cd97ebd914a0f8ad0e32d390dee3 (patch) | |
tree | 3dbb2357165b0fb001f09bdad4190a9fcf82213c /import.php | |
parent | 516891a6b8b38c6fc0921e434318a834d2133038 (diff) |
Ajax and bookmark delete
Diffstat (limited to 'import.php')
-rw-r--r-- | import.php | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/import.php b/import.php index 12af12f349..d3c4b79313 100644 --- a/import.php +++ b/import.php @@ -166,6 +166,7 @@ if (!empty($id_bookmark)) { $import_text = PMA_Bookmark_get($db, $id_bookmark); if ($GLOBALS['is_ajax_request'] == true) { $extra_data['sql_query'] = $import_text; + $extra_data['action_bookmark'] = $action_bookmark; $message = PMA_Message::success(__('Showing bookmark')); PMA_ajaxResponse($message, $message->isSuccess(), $extra_data); } else { @@ -175,8 +176,15 @@ if (!empty($id_bookmark)) { case 2: // bookmarked query that have to be deleted $import_text = PMA_Bookmark_get($db, $id_bookmark); PMA_Bookmark_delete($db, $id_bookmark); - $run_query = false; - $error = true; // this is kind of hack to skip processing the query + if ($GLOBALS['is_ajax_request'] == true) { + $message = PMA_Message::success(__('The bookmark has been deleted.')); + $extra_data['action_bookmark'] = $action_bookmark; + $extra_data['id_bookmark'] = $id_bookmark; + PMA_ajaxResponse($message, $message->isSuccess(), $extra_data); + } else { + $run_query = false; + $error = true; // this is kind of hack to skip processing the query + } break; } } // end bookmarks reading |