. // reset user's preferences to the defaults require_once("../inc/util.inc"); require_once("../inc/prefs.inc"); $confirmed = get_int("confirmed", true); $user = get_logged_in_user(); if (!$confirmed) { page_head("Confirm reset preferences"); echo " You have requested restoring your computing preferences to the default settings. Your current preferences will be discarded. Do you really want to do this?
"; show_button("prefs_default.php?confirmed=1", "Yes", "Restore default preferences"); show_button("prefs.php", "No", "Keep current preferences"); page_tail(); } else { $prefs = default_prefs_global(); $retval = global_prefs_update($user, $prefs); if ($retval) { error_page("Couldn't restore default preferences."); } else { Header("Location: prefs.php?subset=global&defaults=1$c"); } } ?>