} // END - if
// Was the form submitted?
-if ((isPostRequestElementSet('edit')) && (isPostRequestElementSet('id'))) {
+if ((isPostRequestParameterSet('edit')) && (isPostRequestParameterSet('id'))) {
// Okay, has the user entered some values?
- if (isPostRequestElementSet('percents')) {
+ if (isPostRequestParameterSet('percents')) {
// Revert german commta for testing
- $percents = convertCommaToDot(postRequestElement('percents'));
+ $percents = convertCommaToDot(postRequestParameter('percents'));
// Validate percents
if ((($percents >= getConfig('refback_min_perc')) || (round($percents) == '0')) && ($percents <= getConfig('refback_max_perc'))) {
// Change ref-back for this direct id
- $status = updateMemberRefbackPercents(postRequestElement('id'), postRequestElement('percents'));
+ $status = updateMemberRefbackPercents(postRequestParameter('id'), postRequestParameter('percents'));
// Check status
if (isset($status['ok'])) {
loadTemplate('admin_settings_saved', false, getMessage('MEMBER_REFBACK_DONE'));
} elseif (isset($status['message'])) {
// Something went wrong with error message
- loadTemplate('admin_settings_saved', false, sprintf(getMessage('MEMBER_REFBACK_ERROR_MESSAGE'), $status['message']));
+ loadTemplate('admin_settings_saved', false, getMaskedMessage('MEMBER_REFBACK_ERROR_MESSAGE', $status['message']));
} else {
// No message found
loadTemplate('admin_settings_saved', false, getMessage('MEMBER_REFBACK_ERROR_EMPTY_MESSAGE'));
}
} else {
// Percents out-of-bounds ;-)
- loadTemplate('admin_settings_saved', false, sprintf(getMessage('MEMBER_REFBACK_ERROR_OUT_OF_BOUNDS'), getConfig('refback_min_perc'), getConfig('refback_max_perc')));
+ loadTemplate('admin_settings_saved', false, getMaskedMessage('MEMBER_REFBACK_ERROR_OUT_OF_BOUNDS'));
}
// Insert line
} else {
// Read data from refback table
- $content = getArrayFromUserRefbackData(postRequestElement('id'));
+ $content = getArrayFromUserRefbackData(postRequestParameter('id'));
// Translate comma
$content['refback'] = translateComma($content['refback']);