From 34297125f617f854d2cc009d3cc4f16b6581a1f5 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Tue, 21 Dec 2010 19:22:20 +0000 Subject: [PATCH] Missing bonus mode 'ADD' added --- inc/libs/bonus_functions.php | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) 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 } -- 2.30.2