// User is not logged in
LOAD_URL("modules.php?module=index");
} elseif ((!EXT_IS_ACTIVE("refback")) && (!IS_ADMIN())) {
- // Extension "refback" is not active
ADD_FATAL(EXTENSION_PROBLEM_EXT_INACTIVE, "refback");
return;
}
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']);
// Translate comma
$content['refback'] = TRANSLATE_COMMA($content['refback']);
- $content['min'] = TRANSLATE_COMMA($_CONFIG['refback_min_perc'].".0", true, 1);
- $content['max'] = TRANSLATE_COMMA($_CONFIG['refback_max_perc'].".0", true, 1);
+ $content['min'] = TRANSLATE_COMMA($_CONFIG['refback_min_perc'].".0");
+ $content['max'] = TRANSLATE_COMMA($_CONFIG['refback_max_perc'].".0");
// Load form for editing
LOAD_TEMPLATE("member_refback_edit", false, $content);
// Remember the content
$content['counter'] = TRANSLATE_COMMA($counter);
- $content['percents'] = TRANSLATE_COMMA($content['percents'], true, 1);
+ $content['percents'] = TRANSLATE_COMMA($content['percents']);
$content['rows'] = $rows;
// Load level template