More use of REVERT_COMMA() fixes problems
[mailer.git] / inc / modules / admin / what-config_bonus.php
index 9e4641d..9611686 100644 (file)
@@ -43,17 +43,17 @@ ADD_DESCR("admin", basename(__FILE__));
 if (isset($_POST['ok']))
 {
        // Replace german decimal commas to computer decimal dots
-       $_POST['login_bonus']         = str_replace(",", ".", $_POST['login_bonus']        );
-       $_POST['turbo_bonus']         = str_replace(",", ".", $_POST['turbo_bonus']        );
-       $_POST['bonus_ref']           = str_replace(",", ".", $_POST['bonus_ref']          );
-       $_POST['bonus_order']         = str_replace(",", ".", $_POST['bonus_order']        );
-       $_POST['bonus_notify_points'] = str_replace(",", ".", $_POST['bonus_notify_points']);
+       $_POST['login_bonus']         = REVERT_COMMA($_POST['login_bonus']        );
+       $_POST['turbo_bonus']         = REVERT_COMMA($_POST['turbo_bonus']        );
+       $_POST['bonus_ref']           = REVERT_COMMA($_POST['bonus_ref']          );
+       $_POST['bonus_order']         = REVERT_COMMA($_POST['bonus_order']        );
+       $_POST['bonus_notify_points'] = REVERT_COMMA($_POST['bonus_notify_points']);
 
        // Generate string for saving ranks
        $_POST['turbo_rates'] = ""; $RATES = array();
        foreach ($_POST['rate'] as $rate)
        {
-               $rate = trim(str_replace(",", ".", $rate));
+               $rate = trim(REVERT_COMMA($rate));
                if (isset($rate)) $RATES[] = $rate;
        }
        $_POST['turbo_rates'] = trim(implode(";", $RATES));