diff options
author | Michal Čihař <michal@cihar.com> | 2016-12-07 20:17:59 +0300 |
---|---|---|
committer | Michal Čihař <michal@cihar.com> | 2016-12-07 20:17:59 +0300 |
commit | 308c9d79512d8b8a759e787d11ab1668138d0d5f (patch) | |
tree | 92336b7ff438ff6d7b3ffbc5248e7834d56a8663 /db_operations.php | |
parent | b56f101039b73866894325b0f6ab13894f0e44b2 (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 'db_operations.php')
-rw-r--r-- | db_operations.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/db_operations.php b/db_operations.php index 253c1eaca0..9f884f0474 100644 --- a/db_operations.php +++ b/db_operations.php @@ -11,6 +11,7 @@ * * @package PhpMyAdmin */ +use PMA\libraries\Response; use PMA\libraries\plugins\export\ExportSql; /** @@ -26,7 +27,7 @@ require_once 'libraries/check_user_privileges.lib.php'; require_once 'libraries/operations.lib.php'; // add a javascript file for jQuery functions to handle Ajax actions -$response = PMA\libraries\Response::getInstance(); +$response = Response::getInstance(); $header = $response->getHeader(); $scripts = $header->getScripts(); $scripts->addFile('db_operations.js'); @@ -174,7 +175,6 @@ if (strlen($GLOBALS['db'] > 0) * Database has been successfully renamed/moved. If in an Ajax request, * generate the output with {@link PMA\libraries\Response} and exit */ - $response = PMA\libraries\Response::getInstance(); if ($response->isAjax()) { $response->setRequestStatus($message->isSuccess()); $response->addJSON('message', $message); |