Complete rewrite of and , wrapper functions added, see bug #101
[mailer.git] / inc / modules / admin / what-config_beg.php
index 6bc51b7e8d8b4a25c5a64136065e1d9d91dad151..1f4d63502697f7cd804f04af95cf6ea1740ccfd1 100644 (file)
@@ -40,19 +40,19 @@ if ((!defined('__SECURITY')) || (!IS_ADMIN())) {
 // Add description as navigation point
 ADD_DESCR("admin", __FILE__);
 
-if (isset($_POST['ok'])) {
+if (IS_FORM_SENT()) {
        // Translate german decimal commas to computer decimal dots
-       $_POST['beg_points']       = REVERT_COMMA($_POST['beg_points']      );
-       $_POST['beg_points_max']   = REVERT_COMMA($_POST['beg_points_max']  );
-       $_POST['beg_notify_bonus'] = REVERT_COMMA($_POST['beg_notify_bonus']);
+       REQUEST_SET_POST('beg_points'      , REVERT_COMMA(REQUEST_POST('beg_points')      ));
+       REQUEST_SET_POST('beg_points_max'  , REVERT_COMMA(REQUEST_POST('beg_points_max')  ));
+       REQUEST_SET_POST('beg_notify_bonus', REVERT_COMMA(REQUEST_POST('beg_notify_bonus')));
 
        // Save settings
-       ADMIN_SAVE_SETTINGS($_POST);
+       ADMIN_SAVE_SETTINGS_POST();
 
        // Remember new settings
-       setConfigEntry('beg_rallye'       , $_POST['beg_rallye']);
-       setConfigEntry('beg_ral_en_notify', $_POST['beg_ral_en_notify']);
-       setConfigEntry('beg_ral_di_notify', $_POST['beg_ral_di_notify']);
+       setConfigEntry('beg_rallye'       , REQUEST_POST('beg_rallye'));
+       setConfigEntry('beg_ral_en_notify', REQUEST_POST('beg_ral_en_notify'));
+       setConfigEntry('beg_ral_di_notify', REQUEST_POST('beg_ral_di_notify'));
 } else {
        // Prepare constants for the template
        define('__BEG_POINTS'           , TRANSLATE_COMMA(getConfig('beg_points')      , false));