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 /server_privileges.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 'server_privileges.php')
-rw-r--r--server_privileges.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/server_privileges.php b/server_privileges.php
index 1e426d42ed..806ed1904d 100644
--- a/server_privileges.php
+++ b/server_privileges.php
@@ -297,7 +297,7 @@ if (isset($message_ret)) {
* If we are in an Ajax request for Create User/Edit User/Revoke User/
* Flush Privileges, show $message and exit.
*/
-if ($GLOBALS['is_ajax_request']
+if ($response->isAjax()
&& empty($_REQUEST['ajax_page_request'])
&& ! isset($_REQUEST['export'])
&& (! isset($_REQUEST['submit_mult']) || $_REQUEST['submit_mult'] != 'export')
@@ -380,7 +380,7 @@ if (isset($_REQUEST['export'])
unset($username, $hostname, $grants, $one_grant);
$response = PMA\libraries\Response::getInstance();
- if ($GLOBALS['is_ajax_request']) {
+ if ($response->isAjax()) {
$response->addJSON('message', $export);
$response->addJSON('title', $title);
exit;
@@ -434,7 +434,7 @@ if (isset($_REQUEST['adduser'])) {
} else {
// A user was selected -> display the user's properties
// In an Ajax request, prevent cached values from showing
- if ($GLOBALS['is_ajax_request'] == true) {
+ if ($response->isAjax()) {
header('Cache-Control: no-cache');
}