From 6bfe4e5cd741cb5690a42ef9e67253a0603ee2b6 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Sun, 12 Oct 2008 01:05:54 +0000 Subject: [PATCH] Final fixes of previous bugs in refback --- inc/databases.php | 2 +- inc/language/refback_de.php | 2 +- inc/modules/member/what-refback.php | 5 ++++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/inc/databases.php b/inc/databases.php index af0f6871f1..3b9705abd6 100644 --- a/inc/databases.php +++ b/inc/databases.php @@ -113,7 +113,7 @@ define('USAGE_BASE', "usage"); define('SERVER_URL', "http://www.mxchange.org"); // This current patch level -define('CURR_SVN_REVISION', "499"); +define('CURR_SVN_REVISION', "500"); // Take a prime number which is long (if you know a longer one please try it out!) define('_PRIME', 591623); diff --git a/inc/language/refback_de.php b/inc/language/refback_de.php index 2852c8e762..d62fc64ca8 100644 --- a/inc/language/refback_de.php +++ b/inc/language/refback_de.php @@ -75,7 +75,7 @@ define('MEMBER_REFBACK_ERROR_INVALID_ID_NUMBER', "Ungültige ID-Nummer ü define('MEMBER_REFBACK_ERROR_INVALID_PERCENTAGE', "Prozentsatz ungültig. 0 bis 100 sind gültige Werte."); define('MEMBER_REFBACK_ERROR_ID_MISMATCH', "Die ausgewählte Ref-Back ID gehört Ihnen nicht."); define('MEMBER_REFBACK_ERROR_NOT_UPDATED', "Ref-Back nicht aktualisiert."); -define('MEMBER_REFBACK_ERROR_OUT_OF_BOUNDS', "Sie können nur mindestens %s% und maximal %s% einstellen!"); +define('MEMBER_REFBACK_ERROR_OUT_OF_BOUNDS', "Sie können nur mindestens %s% und maximal %s% einstellen!"); define('MEMBER_REFBACK_DONE', "Ref-Back eingestellt. Dieser ist ab jetzt gültig."); // Subject lines diff --git a/inc/modules/member/what-refback.php b/inc/modules/member/what-refback.php index 10ab231b58..d827e2e2ec 100644 --- a/inc/modules/member/what-refback.php +++ b/inc/modules/member/what-refback.php @@ -59,8 +59,11 @@ ADD_DESCR("member", __FILE__); if ((isset($_POST['edit'])) && (isset($_POST['id']))) { // Okay, has the user entered some values? if (isset($_POST['percents'])) { + // Revert german commta for testing + $percents = REVERT_COMMA($_POST['percents']); + // Validate percents - if ((($_POST['percents'] >= $_CONFIG['refback_min_perc']) || ($_POST['percents'] == 0)) && ($_POST['percents'] <= $_CONFIG['refback_max_perc'])) { + if ((($percents >= $_CONFIG['refback_min_perc']) || (round($percents) == 0)) && ($percents <= $_CONFIG['refback_max_perc'])) { // Change ref-back for this direct id $status = REFBACK_CHANGE_MEMBER_PERCENTS($_POST['id'], $_POST['percents']); -- 2.39.5