// Update ref counter...
updateReferalCounter($refid);
- // Shall I 'pay' the referal points imidiately?
- if (getConfig('ref_payout') == '0') {
- // Yes, 'pay' it now
- $locked = false;
- } else {
- // No, 'pay' it later
- $locked = true;
- }
-
// If version matches add ref bonus to refid's account
- if ((isExtensionInstalledAndNewer('bonus', '0.4.4')) && (ifBonusRallyeActive())) {
+ if ((isExtensionInstalledAndNewer('bonus', '0.4.4')) && (isBonusRallyeActive())) {
// Add points (directly only!)
SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_user_data` SET `bonus_ref`=`bonus_ref`+{?bonus_ref?} WHERE `userid`=%s LIMIT 1",
array(bigintval($refid)), __FILE__, __LINE__);
// Add one-time referal bonus over referal system or directly
// @TODO Try to rewrite the following unset()
unset($GLOBALS['ref_level']);
- addPointsThroughReferalSystem('referal_bonus', $refid, getConfig('points_ref'), true, bigintval($userid), $locked, getConfig('reg_points_mode'));
+ addPointsThroughReferalSystem('referal_bonus', $refid, getPointsRef(), true, bigintval($userid), getConfig('reg_points_mode'));
} // END - if
} // END - if