From b56f101039b73866894325b0f6ab13894f0e44b2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20=C4=8Ciha=C5=99?= Date: Wed, 7 Dec 2016 17:54:34 +0100 Subject: Remove is_ajax_request global MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit We already have the same information on Response object, so let's use it from there. Issue #11731 Signed-off-by: Michal Čihař --- index.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'index.php') diff --git a/index.php b/index.php index baafdd9373..abe673bf17 100644 --- a/index.php +++ b/index.php @@ -79,11 +79,11 @@ if (! empty($_REQUEST['db'])) { exit; } +$response = PMA\libraries\Response::getInstance(); /** * Check if it is an ajax request to reload the recent tables list. */ -if ($GLOBALS['is_ajax_request'] && ! empty($_REQUEST['recent_table'])) { - $response = PMA\libraries\Response::getInstance(); +if ($response->isAjax() && ! empty($_REQUEST['recent_table'])) { $response->addJSON( 'list', RecentFavoriteTable::getInstance('recent')->getHtmlList() @@ -92,7 +92,7 @@ if ($GLOBALS['is_ajax_request'] && ! empty($_REQUEST['recent_table'])) { } if ($GLOBALS['PMA_Config']->isGitRevision()) { - if (isset($_REQUEST['git_revision']) && $GLOBALS['is_ajax_request'] == true) { + if (isset($_REQUEST['git_revision']) && $response->isAjax()) { PMA_printGitRevision(); exit; } -- cgit v1.2.3