From: Roland Häder Date: Tue, 21 Dec 2010 19:22:20 +0000 (+0000) Subject: Missing bonus mode 'ADD' added X-Git-Url: https://git.mxchange.org/?p=mailer.git;a=commitdiff_plain;h=34297125f617f854d2cc009d3cc4f16b6581a1f5;ds=sidebyside Missing bonus mode 'ADD' added --- diff --git a/inc/libs/bonus_functions.php b/inc/libs/bonus_functions.php index 968002a3cd..e9e982ff6e 100644 --- a/inc/libs/bonus_functions.php +++ b/inc/libs/bonus_functions.php @@ -107,7 +107,9 @@ function addTurboBonus ($mid, $userid, $type) { $points ), __FUNCTION__, __LINE__); - if ((isExtensionInstalledAndNewer('bonus', '0.3.5')) && (getBonusMode() != 'ADD') && ($points > 0)) handleBonusPoints($points); + if ((isExtensionInstalledAndNewer('bonus', '0.3.5')) && (getBonusMode() != 'ADD') && ($points > 0)) { + handleBonusPoints($points); + } // END - if } // @@ -232,6 +234,10 @@ function handleBonusPoints ($mode) { // Subtract points from... switch (getBonusMode()) { + case 'ADD': // Only add them (no subtraction) + // Ignored + break; + case 'JACKPOT': // ... jackpot if ((isExtensionActive('jackpot')) && (subtractPointsFromJackpot($points) == -1) && (isValidUserId(getBonusUserId()))) { if ($total >= $points) { @@ -252,7 +258,7 @@ function handleBonusPoints ($mode) { break; default: // This should not happen - debug_report_bug(__FUNCTION__, __LINE__, 'Invalid config entry ' . getBonusMode() . ' detected.'); + debug_report_bug(__FUNCTION__, __LINE__, 'Invalid bonus-mode ' . getBonusMode() . ' detected.'); break; } // END - switch }