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 /prefs_manage.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 'prefs_manage.php')
-rw-r--r--prefs_manage.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/prefs_manage.php b/prefs_manage.php
index 88c413f298..c112184827 100644
--- a/prefs_manage.php
+++ b/prefs_manage.php
@@ -26,6 +26,7 @@ require 'libraries/config/user_preferences.forms.php';
$cf = new ConfigFile($GLOBALS['PMA_Config']->base_settings);
PMA_userprefsPageInit($cf);
+$response = Response::getInstance();
$error = '';
if (isset($_POST['submit_export'])
@@ -33,7 +34,7 @@ if (isset($_POST['submit_export'])
&& $_POST['export_type'] == 'text_file'
) {
// export to JSON file
- PMA\libraries\Response::getInstance()->disable();
+ $response->disable();
$filename = 'phpMyAdmin-config-' . urlencode(PMA_getenv('HTTP_HOST')) . '.json';
PMA_downloadHeader($filename, 'application/json');
$settings = PMA_loadUserprefs();
@@ -44,7 +45,7 @@ if (isset($_POST['submit_export'])
&& $_POST['export_type'] == 'php_file'
) {
// export to JSON file
- PMA\libraries\Response::getInstance()->disable();
+ $response->disable();
$filename = 'phpMyAdmin-config-' . urlencode(PMA_getenv('HTTP_HOST')) . '.php';
PMA_downloadHeader($filename, 'application/php');
$settings = PMA_loadUserprefs();
@@ -57,7 +58,6 @@ if (isset($_POST['submit_export'])
exit;
} else if (isset($_POST['submit_get_json'])) {
$settings = PMA_loadUserprefs();
- $response = PMA\libraries\Response::getInstance();
$response->addJSON('prefs', json_encode($settings['config_data']));
$response->addJSON('mtime', $settings['mtime']);
exit;