Complete rewrite of and , wrapper functions added, see bug #101
[mailer.git] / inc / modules / admin / what-config_register2.php
index 0b66142186e1d586c940d3995d5041562214ca01..3356d97c9fdbb19150058f90f88a1e05d6f6b930 100644 (file)
@@ -40,13 +40,13 @@ if ((!defined('__SECURITY')) || (!IS_ADMIN())) {
 // Add description as navigation point
 ADD_DESCR("admin", __FILE__);
 
-if (isset($_POST['ok'])) {
+if (IS_FORM_SENT()) {
        // Calculate timestamp from selections...
-       $_POST['ip_timeout'] = CREATE_TIMESTAMP_FROM_SELECTIONS("ip_timeout", $_POST);
-       $_POST['least_cats'] = round($_POST['least_cats']);
+       REQUEST_SET_POST('ip_timeout', CREATE_TIMESTAMP_FROM_SELECTIONS("ip_timeout", REQUEST_POST_ARRAY()));
+       REQUEST_SET_POST('least_cats', round(REQUEST_POST('least_cats')));
 
        // Save settings
-       ADMIN_SAVE_SETTINGS($_POST);
+       ADMIN_SAVE_SETTINGS_POST();
 } else {
        // Remember stuff in constants
        define('LEAST_CATS_VALUE'   , round(getConfig('least_cats')));