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 /tbl_replace.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 'tbl_replace.php')
-rw-r--r-- | tbl_replace.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tbl_replace.php b/tbl_replace.php index 725defa5a3..55c060a13c 100644 --- a/tbl_replace.php +++ b/tbl_replace.php @@ -12,6 +12,7 @@ * @package PhpMyAdmin */ use PMA\libraries\plugins\IOTransformationsPlugin; +use PMA\libraries\Response; use PMA\libraries\Table; /** @@ -35,7 +36,7 @@ $GLOBALS['dbi']->selectDb($GLOBALS['db']); */ $goto_include = false; -$response = PMA\libraries\Response::getInstance(); +$response = Response::getInstance(); $header = $response->getHeader(); $scripts = $header->getScripts(); $scripts->addFile('makegrid.js'); @@ -440,7 +441,6 @@ if ($response->isAjax() && ! isset($_POST['ajax_page_request'])) { $extra_data['sql_query'] = PMA\libraries\Util::getMessage($message, $GLOBALS['display_query']); - $response = PMA\libraries\Response::getInstance(); $response->setRequestStatus($message->isSuccess()); $response->addJSON('message', $message); $response->addJSON($extra_data); |