X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=inc%2Flibs%2Fbonus_functions.php;h=acdc940d724fc5790b354bbe5808a9895f893e9e;hb=e06775aabf59031184adf27803887ed26e501e2f;hp=c6768029f0219a4162909c4c336b4cbefb002ffc;hpb=b0b5a841a592386c3e21724c216db5d1f451ede7;p=mailer.git diff --git a/inc/libs/bonus_functions.php b/inc/libs/bonus_functions.php index c6768029f0..acdc940d72 100644 --- a/inc/libs/bonus_functions.php +++ b/inc/libs/bonus_functions.php @@ -65,7 +65,7 @@ function addTurboBonus ($mid, $userid, $type) { default: logDebugMessage(__FUNCTION__, __LINE__, sprintf("Invalid type %s detected.", $type)); break; - } + } // END - switch // Is a column name set? if (empty($column)) { @@ -235,7 +235,7 @@ function handleBonusPoints ($mode) { } // Check his amount first - $total = countSumTotalData(getBonusUserId(), 'user_points', 'points') - countSumTotalData(getBonusUserId(), 'user_data', 'used_points'); + $total = getTotalPoints(getBonusUserId()); // Subtract points from... switch (getConfig('bonus_mode')) { @@ -314,6 +314,10 @@ LIMIT 1', } } +/////////////////////////////////////////////////////////////////////////////// +// Wrapper functions // +/////////////////////////////////////////////////////////////////////////////// + // Determines wether the "bonus rallye" is active function isBonusRallyeActive () { // Do we have cache? @@ -326,5 +330,17 @@ function isBonusRallyeActive () { return $GLOBALS['bonus_rallye_active']; } +// Determines wether the "bonus new_member_notify" is active +function isBonusNewMemberNotifyEnabled () { + // Do we have cache? + if (!isset($GLOBALS['bonus_new_member_notify_active'])) { + // Just determine it + $GLOBALS['bonus_new_member_notify_active'] = (getConfig('bonus_new_member_notify') == 'Y'); + } // END - if + + // Return cache + return $GLOBALS['bonus_new_member_notify_active']; +} + // [EOF] ?>