private function reset_options_for_id($id) { $reset_options = array(); switch ($id) { case 1: //nothing to reset , already done with the ok module break; } if (count($reset_options)) { donut_reset_options($reset_options); } }
/** * reset all blog options * * @return bool */ function donut_reset_all_options() { donut_reset_options(donut_get_all_options()); return true; }
$getoptions = array(); foreach ($showoptions as $optionname) { if (strlen($optionname) && strpos($optionname, '/') === false) { // empties represent spacers in forms $getoptions[] = $optionname; } } // Process user actions $errors = array(); $securityexpired = false; $formokhtml = null; if (qa_clicked('doresetoptions')) { if (!qa_check_form_security_code('admin/' . $adminsection, qa_post_text('code'))) { $securityexpired = true; } else { donut_reset_options($getoptions); $formokhtml = donut_lang_html('options_reset'); } } elseif (qa_clicked('dosaveoptions')) { if (!qa_check_form_security_code('admin/' . $adminsection, qa_post_text('code'))) { $securityexpired = true; } else { foreach ($getoptions as $optionname) { $optionvalue = qa_post_text('option_' . $optionname); if (@$optiontype[$optionname] == 'number' || @$optiontype[$optionname] == 'checkbox' || @$optiontype[$optionname] == 'number-blank' && strlen($optionvalue)) { $optionvalue = (int) $optionvalue; } if (isset($optionmaximum[$optionname])) { $optionvalue = min($optionmaximum[$optionname], $optionvalue); } if (isset($optionminimum[$optionname])) {