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-12-07 19:54:34 +0300
committerMichal Čihař <michal@cihar.com>2016-12-07 19:54:34 +0300
commitb56f101039b73866894325b0f6ab13894f0e44b2 (patch)
tree2b0365bed605482fd6aef3454f0c88b1b9e9a41a /import.php
parent77f4e37c37286a607537ae489c15e0afc474a53c (diff)
Remove is_ajax_request global
We already have the same information on Response object, so let's use it from there. Issue #11731 Signed-off-by: Michal Čihař <michal@cihar.com>
Diffstat (limited to 'import.php')
-rw-r--r--import.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/import.php b/import.php
index ee49ca8a67..630f4ff663 100644
--- a/import.php
+++ b/import.php
@@ -335,6 +335,7 @@ $bookmark_created = false;
// Bookmark Support: get a query back from bookmark if required
if (! empty($_REQUEST['id_bookmark'])) {
$id_bookmark = (int)$_REQUEST['id_bookmark'];
+ $response = PMA\libraries\Response::getInstance();
switch ($_REQUEST['action_bookmark']) {
case 0: // bookmarked query that have to be run
$bookmark = Bookmark::get(
@@ -373,9 +374,8 @@ if (! empty($_REQUEST['id_bookmark'])) {
case 1: // bookmarked query that have to be displayed
$bookmark = Bookmark::get($db, $id_bookmark);
$import_text = $bookmark->getQuery();
- if ($GLOBALS['is_ajax_request'] == true) {
+ if ($response->isAjax()) {
$message = PMA\libraries\Message::success(__('Showing bookmark'));
- $response = PMA\libraries\Response::getInstance();
$response->setRequestStatus($message->isSuccess());
$response->addJSON('message', $message);
$response->addJSON('sql_query', $import_text);
@@ -389,7 +389,7 @@ if (! empty($_REQUEST['id_bookmark'])) {
$bookmark = Bookmark::get($db, $id_bookmark);
if (! empty($bookmark)) {
$bookmark->delete();
- if ($GLOBALS['is_ajax_request'] == true) {
+ if ($response->isAjax()) {
$message = PMA\libraries\Message::success(
__('The bookmark has been deleted.')
);