diff --git a/user_preferences.php b/user_preferences.php index 5763ea647..d0a0abeea 100644 --- a/user_preferences.php +++ b/user_preferences.php @@ -67,7 +67,7 @@ foreach ($forms[$form_param] as $form_name => $form) { $form_display->registerForm($form_name, $form); } -if (filter_input(INPUT_GET, 'mode') == 'revert') { +if (isset($_POST['revert'])) { // revert erroneous fields to their default values $form_display->fixErrors(); // redirect @@ -82,19 +82,14 @@ if (!$form_display->process(false)) { } else { // check for form errors if ($form_display->hasErrors()) { - // form has errors, show warning - $separator = PMA_get_arg_separator('html'); + // form has errors ?> -
-

-
- -
- displayErrors() ?> - -   - +
+ + displayErrors(); ?> +
display(true, true); } else { // save settings $result = PMA_save_userprefs();