$form) { // skip Developer form if no setting is available if ($form_name == 'Developer' && !$GLOBALS['cfg']['UserprefsDeveloperTab']) { continue; } $form_display->registerForm($form_name, $form); } if (isset($_POST['revert'])) { // revert erroneous fields to their default values $form_display->fixErrors(); // redirect $url_params = array('form' => $form_param); PMA_sendHeaderLocation($cfg['PmaAbsoluteUri'] . 'prefs_forms.php' . PMA_generate_common_url($url_params, '&')); exit; } if (!$form_display->process(false)) { // handle form view and failed POST $form_display->display(true, true); } else { // check for form errors if ($form_display->hasErrors()) { // form has errors ?>
displayErrors(); ?>
display(true, true); } else { // save settings $old_settings = PMA_load_userprefs(); $result = PMA_save_userprefs($cf->getConfigArray()); if ($result === true) { $hash = ltrim(filter_input(INPUT_POST, 'tab_hash'), '#'); PMA_userprefs_redirect($forms, $old_settings, 'prefs_forms.php', array( 'form' => $form_param), $hash); exit; } else { $result->display(); } $form_display->display(true, true); } } /** * Displays the footer */ require './libraries/footer.inc.php'; ?>