Missing bonus mode 'ADD' added
authorRoland Häder <roland@mxchange.org>
Tue, 21 Dec 2010 19:22:20 +0000 (19:22 +0000)
committerRoland Häder <roland@mxchange.org>
Tue, 21 Dec 2010 19:22:20 +0000 (19:22 +0000)
inc/libs/bonus_functions.php

index 968002a3cdbad4dec09dadc437adae0b0858c5dc..e9e982ff6eea67a825f157639b84ae9ad92c95e0 100644 (file)
@@ -107,7 +107,9 @@ function addTurboBonus ($mid, $userid, $type) {
                        $points
                ), __FUNCTION__, __LINE__);
 
                        $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()) {
 
        // 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) {
                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
                        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
 }
                        break;
        } // END - switch
 }