More use of REVERT_COMMA() fixes problems
[mailer.git] / inc / modules / admin / what-config_doubler.php
index 42bbc12..48ab8b8 100644 (file)
@@ -42,11 +42,11 @@ ADD_DESCR("admin", basename(__FILE__));
 
 if (isset($_POST['ok'])) {
        // Replace commata with decimal dot
-       $_POST['doubler_charge'] = str_replace(",", ".", ($_POST['doubler_charge'] / 100));
-       $_POST['doubler_ref']    = str_replace(",", ".", ($_POST['doubler_ref'] / 100));
-       $_POST['doubler_min']    = str_replace(",", ".", $_POST['doubler_min']);
-       $_POST['doubler_max']    = str_replace(",", ".", $_POST['doubler_max']);
-       $_POST['doubler_left']   = str_replace(",", ".", $_POST['doubler_left']);
+       $_POST['doubler_charge'] = REVERT_COMMA(($_POST['doubler_charge'] / 100));
+       $_POST['doubler_ref']    = REVERT_COMMA(($_POST['doubler_ref'] / 100));
+       $_POST['doubler_min']    = REVERT_COMMA($_POST['doubler_min']);
+       $_POST['doubler_max']    = REVERT_COMMA($_POST['doubler_max']);
+       $_POST['doubler_left']   = REVERT_COMMA($_POST['doubler_left']);
 
        // Save settings
        ADMIN_SAVE_SETTINGS($_POST);