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 20:17:59 +0300
committerMichal Čihař <michal@cihar.com>2016-12-07 20:17:59 +0300
commit308c9d79512d8b8a759e787d11ab1668138d0d5f (patch)
tree92336b7ff438ff6d7b3ffbc5248e7834d56a8663 /server_privileges.php
parentb56f101039b73866894325b0f6ab13894f0e44b2 (diff)
Simplify Response object handling
- always use use and short name - avoid calling getInstance() several times in one script Signed-off-by: Michal Čihař <michal@cihar.com>
Diffstat (limited to 'server_privileges.php')
-rw-r--r--server_privileges.php5
1 files changed, 2 insertions, 3 deletions
diff --git a/server_privileges.php b/server_privileges.php
index 806ed1904d..06989de1c3 100644
--- a/server_privileges.php
+++ b/server_privileges.php
@@ -5,6 +5,7 @@
*
* @package PhpMyAdmin
*/
+use PMA\libraries\Response;
/**
* include common file
@@ -23,7 +24,7 @@ $cfgRelation = PMA_getRelationsParam();
/**
* Does the common work
*/
-$response = PMA\libraries\Response::getInstance();
+$response = Response::getInstance();
$header = $response->getHeader();
$scripts = $header->getScripts();
$scripts->addFile('server_privileges.js');
@@ -316,7 +317,6 @@ if ($response->isAjax()
);
if (! empty($message) && $message instanceof PMA\libraries\Message) {
- $response = PMA\libraries\Response::getInstance();
$response->setRequestStatus($message->isSuccess());
$response->addJSON('message', $message);
$response->addJSON($extra_data);
@@ -379,7 +379,6 @@ if (isset($_REQUEST['export'])
unset($username, $hostname, $grants, $one_grant);
- $response = PMA\libraries\Response::getInstance();
if ($response->isAjax()) {
$response->addJSON('message', $export);
$response->addJSON('title', $title);