Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 385 lines (370 sloc) 14.851 kB
104ac11 @Crack import and export for user preferences (currently JSON file only)
Crack authored
1 <?php
2 /* vim: set expandtab sw=4 ts=4 sts=4: */
3 /**
4 * User preferences management page
5 *
e56949f @nijel Use package name PhpMyAdmin
nijel authored
6 * @package PhpMyAdmin
104ac11 @Crack import and export for user preferences (currently JSON file only)
Crack authored
7 */
8
9 /**
10 * Gets some core libraries and displays a top message if required
11 */
b2fd866 Leading ./ paths for includes can be omitted, part 2
Jo Michael authored
12 require_once 'libraries/common.inc.php';
13 require_once 'libraries/user_preferences.lib.php';
14 require_once 'libraries/config/config_functions.lib.php';
15 require_once 'libraries/config/messages.inc.php';
16 require_once 'libraries/config/ConfigFile.class.php';
17 require_once 'libraries/config/Form.class.php';
18 require_once 'libraries/config/FormDisplay.class.php';
19 require 'libraries/config/user_preferences.forms.php';
104ac11 @Crack import and export for user preferences (currently JSON file only)
Crack authored
20
a67e41a @Crack Refactored ConfigFile class so that it is no longer a singleton
Crack authored
21 $cf = new ConfigFile($GLOBALS['PMA_Config']->base_settings);
22 PMA_userprefsPageInit($cf);
279724d @Crack bugfix: user preferences don't work correctly without output buffering
Crack authored
23
104ac11 @Crack import and export for user preferences (currently JSON file only)
Crack authored
24 $error = '';
9a47688 @madhuracj Various coding style improvements
madhuracj authored
25 if (isset($_POST['submit_export'])
0f76d59 @madhuracj Quit using filter_input since they bypass token check
madhuracj authored
26 && isset($_POST['export_type'])
27 && $_POST['export_type'] == 'text_file'
9a47688 @madhuracj Various coding style improvements
madhuracj authored
28 ) {
104ac11 @Crack import and export for user preferences (currently JSON file only)
Crack authored
29 // export to JSON file
8b0f21a @roccivic Fixed user preferences export/import
roccivic authored
30 PMA_Response::getInstance()->disable();
104ac11 @Crack import and export for user preferences (currently JSON file only)
Crack authored
31 $filename = 'phpMyAdmin-config-' . urlencode(PMA_getenv('HTTP_HOST')) . '.json';
10510e1 @madhuracj Fix function name: PMA_download_header -> PMA_downloadHeader
madhuracj authored
32 PMA_downloadHeader($filename, 'application/json');
1a177f1 @madhuracj Coding style: Fix some methods names
madhuracj authored
33 $settings = PMA_loadUserprefs();
cd249f1 @madhuracj rfe #1572 User prefs: Diff-friendly JSON for config
madhuracj authored
34 echo json_encode($settings['config_data'], JSON_PRETTY_PRINT);
a16e723 @roccivic Dropped PMA_ajaxResponse()
roccivic authored
35 exit;
5717683 @Crack basic import/export for localStorage, needs to be polished
Crack authored
36 } else if (isset($_POST['submit_get_json'])) {
1a177f1 @madhuracj Coding style: Fix some methods names
madhuracj authored
37 $settings = PMA_loadUserprefs();
a16e723 @roccivic Dropped PMA_ajaxResponse()
roccivic authored
38 $response = PMA_Response::getInstance();
39 $response->addJSON('prefs', json_encode($settings['config_data']));
40 $response->addJSON('mtime', $settings['mtime']);
41 exit;
104ac11 @Crack import and export for user preferences (currently JSON file only)
Crack authored
42 } else if (isset($_POST['submit_import'])) {
43 // load from JSON file
44 $json = '';
0f76d59 @madhuracj Quit using filter_input since they bypass token check
madhuracj authored
45 if (isset($_POST['import_type'])
46 && $_POST['import_type'] == 'text_file'
3332151 @madhuracj Fix Checkstyle Warnings - Type: CloseBracketLine (Closing parenthesis…
madhuracj authored
47 && isset($_FILES['import_file'])
48 && $_FILES['import_file']['error'] == UPLOAD_ERR_OK
49 && is_uploaded_file($_FILES['import_file']['tmp_name'])
50 ) {
104ac11 @Crack import and export for user preferences (currently JSON file only)
Crack authored
51 // read JSON from uploaded file
52 $open_basedir = @ini_get('open_basedir');
53 $file_to_unlink = '';
54 $import_file = $_FILES['import_file']['tmp_name'];
55
56 // If we are on a server with open_basedir, we must move the file
57 // before opening it. The doc explains how to create the "./tmp"
58 // directory
59 if (!empty($open_basedir)) {
b2fd866 Leading ./ paths for includes can be omitted, part 2
Jo Michael authored
60 $tmp_subdir = (PMA_IS_WINDOWS ? '.\\tmp\\' : 'tmp/');
104ac11 @Crack import and export for user preferences (currently JSON file only)
Crack authored
61 if (is_writable($tmp_subdir)) {
62 $import_file_new = tempnam($tmp_subdir, 'prefs');
63 if (move_uploaded_file($import_file, $import_file_new)) {
64 $import_file = $import_file_new;
65 $file_to_unlink = $import_file_new;
66 }
67 }
68 }
69 $json = file_get_contents($import_file);
70 if ($file_to_unlink) {
71 unlink($file_to_unlink);
72 }
73 } else {
74 // read from POST value (json)
0f76d59 @madhuracj Quit using filter_input since they bypass token check
madhuracj authored
75 $json = isset($_POST['json']) ? $_POST['json'] : null;
104ac11 @Crack import and export for user preferences (currently JSON file only)
Crack authored
76 }
7a5fd62 @Crack allow users to easily work with preferences stored in session (when p…
Crack authored
77
78 // hide header message
79 $_SESSION['userprefs_autoload'] = true;
80
104ac11 @Crack import and export for user preferences (currently JSON file only)
Crack authored
81 $config = json_decode($json, true);
0f76d59 @madhuracj Quit using filter_input since they bypass token check
madhuracj authored
82 $return_url = isset($_POST['return_url']) ? $_POST['return_url'] : null;
e6211f0 @lem9 Other replacements for easier reading
lem9 authored
83 if (! is_array($config)) {
104ac11 @Crack import and export for user preferences (currently JSON file only)
Crack authored
84 $error = __('Could not import configuration');
85 } else {
9a47688 @madhuracj Various coding style improvements
madhuracj authored
86 // sanitize input values: treat them as though
87 // they came from HTTP POST request
a67e41a @Crack Refactored ConfigFile class so that it is no longer a singleton
Crack authored
88 $form_display = new FormDisplay($cf);
104ac11 @Crack import and export for user preferences (currently JSON file only)
Crack authored
89 foreach ($forms as $formset_id => $formset) {
90 foreach ($formset as $form_name => $form) {
91 $form_display->registerForm($formset_id . ': ' . $form_name, $form);
92 }
93 }
9d4c540 @Crack fix import merge
Crack authored
94 $new_config = $cf->getFlatDefaultConfig();
95 if (!empty($_POST['import_merge'])) {
96 $new_config = array_merge($new_config, $cf->getConfigArray());
104ac11 @Crack import and export for user preferences (currently JSON file only)
Crack authored
97 }
9d4c540 @Crack fix import merge
Crack authored
98 $new_config = array_merge($new_config, $config);
104ac11 @Crack import and export for user preferences (currently JSON file only)
Crack authored
99 $_POST_bak = $_POST;
9d4c540 @Crack fix import merge
Crack authored
100 foreach ($new_config as $k => $v) {
104ac11 @Crack import and export for user preferences (currently JSON file only)
Crack authored
101 $_POST[str_replace('/', '-', $k)] = $v;
102 }
9d4c540 @Crack fix import merge
Crack authored
103 $cf->resetConfigData();
104ac11 @Crack import and export for user preferences (currently JSON file only)
Crack authored
104 $all_ok = $form_display->process(true, false);
e7dd9a7 @Crack allow to partially import broken configs - show message with error li…
Crack authored
105 $all_ok = $all_ok && !$form_display->hasErrors();
104ac11 @Crack import and export for user preferences (currently JSON file only)
Crack authored
106 $_POST = $_POST_bak;
107
e7dd9a7 @Crack allow to partially import broken configs - show message with error li…
Crack authored
108 if (!$all_ok && isset($_POST['fix_errors'])) {
109 $form_display->fixErrors();
110 $all_ok = true;
111 }
104ac11 @Crack import and export for user preferences (currently JSON file only)
Crack authored
112 if (!$all_ok) {
e7dd9a7 @Crack allow to partially import broken configs - show message with error li…
Crack authored
113 // mimic original form and post json in a hidden field
b2fd866 Leading ./ paths for includes can be omitted, part 2
Jo Michael authored
114 include 'libraries/user_preferences.inc.php';
3e6466a @nijel Wrap some long lines
nijel authored
115 $msg = PMA_Message::error(
116 __('Configuration contains incorrect data for some fields.')
117 );
e7dd9a7 @Crack allow to partially import broken configs - show message with error li…
Crack authored
118 $msg->display();
119 echo '<div class="config-form">';
431847b @nisargjhaveri Return HTML instead of echo-ing directly in FormDisplay
nisargjhaveri authored
120 echo $form_display->displayErrors();
e7dd9a7 @Crack allow to partially import broken configs - show message with error li…
Crack authored
121 echo '</div>';
c9c28f7 @nijel Drop inline html
nijel authored
122 echo '<form action="prefs_manage.php" method="post">';
0a3d1d5 @nijel Better names for URL generating functions
nijel authored
123 echo PMA_URL_getHiddenInputs() . "\n";
3e6466a @nijel Wrap some long lines
nijel authored
124 echo '<input type="hidden" name="json" value="'
125 . htmlspecialchars($json) . '" />';
c9c28f7 @nijel Drop inline html
nijel authored
126 echo '<input type="hidden" name="fix_errors" value="1" />';
127 if (! empty($_POST['import_merge'])) {
8051e20 @nijel Missing ;
nijel authored
128 echo '<input type="hidden" name="import_merge" value="1" />';
c9c28f7 @nijel Drop inline html
nijel authored
129 }
130 if ($return_url) {
3e6466a @nijel Wrap some long lines
nijel authored
131 echo '<input type="hidden" name="return_url" value="'
132 . htmlspecialchars($return_url) . '" />';
c9c28f7 @nijel Drop inline html
nijel authored
133 }
134 echo '<p>';
135 echo __('Do you want to import remaining settings?');
136 echo '</p>';
3e6466a @nijel Wrap some long lines
nijel authored
137 echo '<input type="submit" name="submit_import" value="'
138 . __('Yes') . '" />';
139 echo '<input type="submit" name="submit_ignore" value="'
140 . __('No') . '" />';
c9c28f7 @nijel Drop inline html
nijel authored
141 echo '</form>';
eb98110 @roccivic Dropped footer.inc.php
roccivic authored
142 exit;
e7dd9a7 @Crack allow to partially import broken configs - show message with error li…
Crack authored
143 }
144
145 // check for ThemeDefault and fontsize
146 $params = array();
147 if (isset($config['ThemeDefault'])
4b8d52d @madhuracj Fix CheckStyle warnings, Type:CloseBracketNewLine (Closing parenthesi…
madhuracj authored
148 && $_SESSION['PMA_Theme_Manager']->theme->getId() != $config['ThemeDefault']
149 && $_SESSION['PMA_Theme_Manager']->checkTheme($config['ThemeDefault'])
150 ) {
e7dd9a7 @Crack allow to partially import broken configs - show message with error li…
Crack authored
151 $_SESSION['PMA_Theme_Manager']->setActiveTheme($config['ThemeDefault']);
152 $_SESSION['PMA_Theme_Manager']->setThemeCookie();
153 }
c67340d @Crack save lang and collation_connection to user preferences
Crack authored
154 if (isset($config['fontsize'])
4b8d52d @madhuracj Fix CheckStyle warnings, Type:CloseBracketNewLine (Closing parenthesi…
madhuracj authored
155 && $config['fontsize'] != $GLOBALS['PMA_Config']->get('fontsize')
156 ) {
e7dd9a7 @Crack allow to partially import broken configs - show message with error li…
Crack authored
157 $params['set_fontsize'] = $config['fontsize'];
104ac11 @Crack import and export for user preferences (currently JSON file only)
Crack authored
158 }
c67340d @Crack save lang and collation_connection to user preferences
Crack authored
159 if (isset($config['lang'])
4b8d52d @madhuracj Fix CheckStyle warnings, Type:CloseBracketNewLine (Closing parenthesi…
madhuracj authored
160 && $config['lang'] != $GLOBALS['lang']
161 ) {
c67340d @Crack save lang and collation_connection to user preferences
Crack authored
162 $params['lang'] = $config['lang'];
163 }
164 if (isset($config['collation_connection'])
4b8d52d @madhuracj Fix CheckStyle warnings, Type:CloseBracketNewLine (Closing parenthesi…
madhuracj authored
165 && $config['collation_connection'] != $GLOBALS['collation_connection']
166 ) {
c67340d @Crack save lang and collation_connection to user preferences
Crack authored
167 $params['collation_connection'] = $config['collation_connection'];
168 }
104ac11 @Crack import and export for user preferences (currently JSON file only)
Crack authored
169
170 // save settings
1a177f1 @madhuracj Coding style: Fix some methods names
madhuracj authored
171 $result = PMA_saveUserprefs($cf->getConfigArray());
104ac11 @Crack import and export for user preferences (currently JSON file only)
Crack authored
172 if ($result === true) {
7a5fd62 @Crack allow users to easily work with preferences stored in session (when p…
Crack authored
173 if ($return_url) {
174 $query = explode('&', parse_url($return_url, PHP_URL_QUERY));
175 $return_url = parse_url($return_url, PHP_URL_PATH);
9b77d74 @Tithugues Mass modifications to use PMA_String.
Tithugues authored
176
177 /** @var PMA_String $pmaString */
178 $pmaString = $GLOBALS['PMA_String'];
179
7a5fd62 @Crack allow users to easily work with preferences stored in session (when p…
Crack authored
180 foreach ($query as $q) {
3de8816 @Tithugues Replace PMA_String uses by mb_* calls.
Tithugues authored
181 $pos = /*overload*/mb_strpos($q, '=');
182 $k = /*overload*/mb_substr($q, 0, $pos);
7a5fd62 @Crack allow users to easily work with preferences stored in session (when p…
Crack authored
183 if ($k == 'token') {
184 continue;
185 }
598435f @madhuracj Spaces around - operator
madhuracj authored
186 $params[$k] = /*overload*/mb_substr($q, $pos + 1);
7a5fd62 @Crack allow users to easily work with preferences stored in session (when p…
Crack authored
187 }
188 } else {
189 $return_url = 'prefs_manage.php';
190 }
a6b34a5 @Crack fix generation of theme unique value
Crack authored
191 // reload config
192 $GLOBALS['PMA_Config']->loadUserPreferences();
9008ba4 @roccivic Dropped server side functionality for reloading the left frame from u…
roccivic authored
193 PMA_userprefsRedirect($return_url, $params);
104ac11 @Crack import and export for user preferences (currently JSON file only)
Crack authored
194 exit;
195 } else {
196 $error = $result;
197 }
198 }
199 } else if (isset($_POST['submit_clear'])) {
1a177f1 @madhuracj Coding style: Fix some methods names
madhuracj authored
200 $result = PMA_saveUserprefs(array());
104ac11 @Crack import and export for user preferences (currently JSON file only)
Crack authored
201 if ($result === true) {
e7dd9a7 @Crack allow to partially import broken configs - show message with error li…
Crack authored
202 $params = array();
203 if ($GLOBALS['PMA_Config']->get('fontsize') != '82%') {
204 $GLOBALS['PMA_Config']->removeCookie('pma_fontsize');
205 }
c67340d @Crack save lang and collation_connection to user preferences
Crack authored
206 $GLOBALS['PMA_Config']->removeCookie('pma_collaction_connection');
207 $GLOBALS['PMA_Config']->removeCookie('pma_lang');
9008ba4 @roccivic Dropped server side functionality for reloading the left frame from u…
roccivic authored
208 PMA_userprefsRedirect('prefs_manage.php', $params);
104ac11 @Crack import and export for user preferences (currently JSON file only)
Crack authored
209 exit;
210 } else {
211 $error = $result;
212 }
213 exit;
214 }
215
a054562 @roccivic PMA_Footer and PMA_Header no longer need to be singletons
roccivic authored
216 $response = PMA_Response::getInstance();
217 $header = $response->getHeader();
218 $scripts = $header->getScripts();
4a74037 @roccivic Dropped header.inc.php in favor of the PMA_Header class
roccivic authored
219 $scripts->addFile('config.js');
ae6e50a @roccivic Drop display() from Header and Footer classes. The Response class wil…
roccivic authored
220
b2fd866 Leading ./ paths for includes can be omitted, part 2
Jo Michael authored
221 require 'libraries/user_preferences.inc.php';
98cbab0 @Crack second part of error message display changes
Crack authored
222 if ($error) {
223 if (!$error instanceof PMA_Message) {
224 $error = PMA_Message::error($error);
225 }
226 $error->display();
227 }
104ac11 @Crack import and export for user preferences (currently JSON file only)
Crack authored
228 ?>
5717683 @Crack basic import/export for localStorage, needs to be polished
Crack authored
229 <script type="text/javascript">
230 <?php
51c9fcc @nijel Use same format string as in other places.
nijel authored
231 PMA_printJsValue("PMA_messages['strSavedOn']", __('Saved on: @DATE@'));
5717683 @Crack basic import/export for localStorage, needs to be polished
Crack authored
232 ?>
233 </script>
104ac11 @Crack import and export for user preferences (currently JSON file only)
Crack authored
234 <div id="maincontainer">
235 <div id="main_pane_left">
236 <div class="group">
d2739de @lem9 Fix coding style
lem9 authored
237 <?php
238 echo '<h2>' . __('Import') . '</h2>'
239 . '<form class="group-cnt prefs-form disableAjax" name="prefs_import"'
240 . ' action="prefs_manage.php" method="post" enctype="multipart/form-data">'
241 . PMA_Util::generateHiddenMaxFileSize($GLOBALS['max_upload_size'])
242 . PMA_URL_getHiddenInputs()
243 . '<input type="hidden" name="json" value="" />'
244 . '<input type="radio" id="import_text_file" name="import_type"'
245 . ' value="text_file" checked="checked" />'
246 . '<label for="import_text_file">' . __('Import from file') . '</label>'
247 . '<div id="opts_import_text_file" class="prefsmanage_opts">'
248 . '<label for="input_import_file">' . __('Browse your computer:') . '</label>'
249 . '<input type="file" name="import_file" id="input_import_file" />'
250 . '</div>'
251 . '<input type="radio" id="import_local_storage" name="import_type"'
252 . ' value="local_storage" disabled="disabled" />'
253 . '<label for="import_local_storage">'
254 . __('Import from browser\'s storage') . '</label>'
255 . '<div id="opts_import_local_storage" class="prefsmanage_opts disabled">'
256 . '<div class="localStorage-supported">'
257 . __('Settings will be imported from your browser\'s local storage.')
258 . '<br />'
259 . '<div class="localStorage-exists">'
260 . __('Saved on: @DATE@')
261 . '</div>'
8381c6e @lem9 Do not mix a call to the display method with an echo statement
lem9 authored
262 . '<div class="localStorage-empty">';
263 PMA_Message::notice(__('You have no saved settings!'))->display();
264 echo '</div>'
d2739de @lem9 Fix coding style
lem9 authored
265 . '</div>'
8381c6e @lem9 Do not mix a call to the display method with an echo statement
lem9 authored
266 . '<div class="localStorage-unsupported">';
267 PMA_Message::notice(
f7f5b48 @Tithugues Fix PHPCS errors.
Tithugues authored
268 __('This feature is not supported by your web browser')
269 )->display();
8381c6e @lem9 Do not mix a call to the display method with an echo statement
lem9 authored
270 echo '</div>'
d2739de @lem9 Fix coding style
lem9 authored
271 . '</div>'
272 . '<input type="checkbox" id="import_merge" name="import_merge" />'
273 . '<label for="import_merge">'
274 . __('Merge with current configuration') . '</label>'
275 . '<br /><br />'
276 . '<input type="submit" name="submit_import" value="'
277 . __('Go') . '" />'
278 . '</form>'
279 . '</div>';
280 if (file_exists('setup/index.php')) {
f7c3ea1 @Crack info about setup script in "manage your settings", it seems many peop…
Crack authored
281 // show only if setup script is available, allows to disable this message
282 // by simply removing setup directory
d2739de @lem9 Fix coding style
lem9 authored
283 ?>
284 <div class="group">
f7c3ea1 @Crack info about setup script in "manage your settings", it seems many peop…
Crack authored
285 <h2><?php echo __('More settings') ?></h2>
286 <div class="group-cnt">
287 <?php
66c3491 @Tithugues Minor HTML/PHP rewrite.
Tithugues authored
288 echo sprintf(
289 __(
290 'You can set more settings by modifying config.inc.php, eg. '
291 . 'by using %sSetup script%s.'
292 ), '<a href="setup/index.php" target="_blank">', '</a>'
293 ) . PMA_Util::showDocu('setup', 'setup-script');
f7c3ea1 @Crack info about setup script in "manage your settings", it seems many peop…
Crack authored
294 ?>
295 </div>
d2739de @lem9 Fix coding style
lem9 authored
296 </div>
f7c3ea1 @Crack info about setup script in "manage your settings", it seems many peop…
Crack authored
297 <?php
d2739de @lem9 Fix coding style
lem9 authored
298 }
f7c3ea1 @Crack info about setup script in "manage your settings", it seems many peop…
Crack authored
299 ?>
104ac11 @Crack import and export for user preferences (currently JSON file only)
Crack authored
300 </div>
301 <div id="main_pane_right">
302 <div class="group">
66c3491 @Tithugues Minor HTML/PHP rewrite.
Tithugues authored
303 <h2><?php echo __('Export'); ?></h2>
625b9ed @Crack show message when preferences are saved to localStorage
Crack authored
304 <div class="click-hide-message group-cnt" style="display:none">
305 <?php
66c3491 @Tithugues Minor HTML/PHP rewrite.
Tithugues authored
306 PMA_Message::rawSuccess(
307 __('Configuration has been saved.')
308 )->display();
309 ?>
310 </div>
311 <form class="group-cnt prefs-form disableAjax" name="prefs_export"
312 action="prefs_manage.php" method="post">
313 <?php echo PMA_URL_getHiddenInputs(); ?>
314 <div style="padding-bottom:0.5em">
315 <input type="radio" id="export_text_file" name="export_type"
316 value="text_file" checked="checked" />
317 <label for="export_text_file">
318 <?php echo __('Save as file'); ?>
319 </label><br />
320 <input type="radio" id="export_local_storage" name="export_type"
321 value="local_storage" disabled="disabled" />
322 <label for="export_local_storage">
323 <?php echo __('Save to browser\'s storage'); ?></label>
324 </div>
325 <div id="opts_export_local_storage"
326 class="prefsmanage_opts disabled">
327 <span class="localStorage-supported">
328 <?php
329 echo __(
330 'Settings will be saved in your browser\'s local '
331 . 'storage.'
332 );
333 ?>
334 <div class="localStorage-exists">
335 <b>
336 <?php
337 echo __(
338 'Existing settings will be overwritten!'
339 );
340 ?>
341 </b>
342 </div>
343 </span>
344 <div class="localStorage-unsupported">
345 <?php
346 PMA_Message::notice(
347 __('This feature is not supported by your web browser')
348 )->display();
349 ?>
5b09d0f Cleanup HTML5 validity issues
Jo Michael authored
350 </div>
104ac11 @Crack import and export for user preferences (currently JSON file only)
Crack authored
351 </div>
352 <br />
66c3491 @Tithugues Minor HTML/PHP rewrite.
Tithugues authored
353 <?php
354 echo '<input type="submit" name="submit_export" value="' . __(
355 'Go'
356 ) . '" />';
357 ?>
104ac11 @Crack import and export for user preferences (currently JSON file only)
Crack authored
358 </form>
359 </div>
360 <div class="group">
66c3491 @Tithugues Minor HTML/PHP rewrite.
Tithugues authored
361 <h2><?php echo __('Reset'); ?></h2>
362 <form class="group-cnt prefs-form disableAjax" name="prefs_reset"
363 action="prefs_manage.php" method="post">
364 <?php
365 echo PMA_URL_getHiddenInputs() . __(
366 'You can reset all your settings and restore them to default '
367 . 'values.'
368 );
369 ?>
370 <br /><br />
371 <input type="submit" name="submit_clear"
372 value="<?php echo __('Reset'); ?>"/>
373 </form>
104ac11 @Crack import and export for user preferences (currently JSON file only)
Crack authored
374 </div>
375 </div>
376 <br class="clearfloat" />
377 </div>
9c77ec6 @nisargjhaveri Navigation panel settings
nisargjhaveri authored
378
379 <?php
380 if ($response->isAjax()) {
381 $response->addJSON('_disableNaviSettings', true);
382 } else {
9dfd323 @nisargjhaveri Fix coding style in page settings
nisargjhaveri authored
383 define('PMA_DISABLE_NAVI_SETTINGS', true);
9c77ec6 @nisargjhaveri Navigation panel settings
nisargjhaveri authored
384 }
Something went wrong with that request. Please try again.