// Some percents given?
if ($percents > 0) {
- //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'points=' . $points . ',[percents]=' . $content['refback_percents'] . ',percents=' . $percents . ',level=' . $content['level']);
+ //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'points=' . $points . ',refback_percents=' . $content['refback_percents'] . ',percents=' . $percents . ',level=' . $content['level']);
// Calculate points for refback
$refback = $points * ($content['refback_percents'] / 100) * ($percents / 100);
function updateMemberRefbackPercents ($id, $percents) {
//* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'id=' . $id . ',percents=' . $percents . ' - ENTERED!');
// Default status is failed
- $status['message'] = '{--MEMBER_REFBACK_ERROR_GENERAL--}';
+ $status['message'] = 'MEMBER_REFBACK_ERROR_GENERAL';
// Do some sanity-checks
if (!isMember()) {
// No member!
- $status['message'] = '{--MEMBER_REFBACK_ERROR_NO_MEMBER--}';
+ $status['message'] = 'MEMBER_REFBACK_ERROR_NO_MEMBER';
return $status;
} elseif (''.$id.'' != ''.($id + 0).'') {
// No number!
- $status['message'] = '{--MEMBER_REFBACK_ERROR_INVALID_ID_NUMBER--}';
+ $status['message'] = 'MEMBER_REFBACK_ERROR_INVALID_ID_NUMBER';
return $status;
} elseif (($percents < 0) || ($percents > 100)) {
// Percentage is not valid!
- $status['message'] = '{--MEMBER_REFBACK_ERROR_INVALID_PERCENTAGE--}';
+ $status['message'] = 'MEMBER_REFBACK_ERROR_INVALID_PERCENTAGE';
return $status;
}
// Is this valid?
if (count($dummy) == 0) {
// id does not belong to user!
- $status['message'] = '{--MEMBER_REFBACK_ERROR_ID_MISMATCH--}';
+ $status['message'] = 'MEMBER_REFBACK_ERROR_ID_MISMATCH';
return $status;
} // END - if
// Entry updated?
if (SQL_HASZEROAFFECTED()) {
// Entry not updated!
- $status['message'] = '{--MEMBER_REFBACK_ERROR_NOT_UPDATED--}';
+ $status['message'] = 'MEMBER_REFBACK_ERROR_NOT_UPDATED';
return $status;
} // END - if