$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
}
//
// 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) {
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
}
return $GLOBALS[__FUNCTION__];
}
+// Getter for bonus_ranks
+function getBonusRanks () {
+ // Do we have cache?
+ if (!isset($GLOBALS[__FUNCTION__])) {
+ // Determine it
+ $GLOBALS[__FUNCTION__] = getConfig('bonus_ranks');
+ } // END - if
+
+ // Return cache
+ return $GLOBALS[__FUNCTION__];
+}
+
// [EOF]
?>