More use of REVERT_COMMA() fixes problems
[mailer.git] / inc / modules / admin / what-edit_sponsor.php
index 9b4a761f0f5981343234693d32457297a2f937f9..8840a1a8759f2a26b0bf600e3084e9c533ddf07e 100644 (file)
@@ -105,7 +105,7 @@ if ((!empty($_GET['id'])) && (!empty($_GET['mode']))) {
                        case "add_points": // Add points
                                if (strval($_POST['points']) > 0) {
                                        // Replace german decimal comma with computer's decimal dot
-                                       $POINTS = strval(str_replace(",", ".", $_POST['points']));
+                                       $POINTS = strval(REVERT_COMMA($_POST['points']));
 
                                        // Add points to account
                                        $result_add = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_sponsor_data SET points_amount=points_amount+%s WHERE id='%s' LIMIT 1",
@@ -128,7 +128,7 @@ if ((!empty($_GET['id'])) && (!empty($_GET['mode']))) {
                        case "sub_points": // Subtract points
                                if (strval($_POST['points']) > 0) {
                                        // Replace german decimal comma with computer's decimal dot
-                                       $POINTS = strval(str_replace(",", ".", $_POST['points']));
+                                       $POINTS = strval(REVERT_COMMA($_POST['points']));
 
                                        // Add points to account
                                        $result_add = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_sponsor_data SET points_used=points_used+%s WHERE id='%s' LIMIT 1",