]> git.mxchange.org Git - mailer.git/blobdiff - inc/libs/doubler_functions.php
Filters for configurable userid exclusion added:
[mailer.git] / inc / libs / doubler_functions.php
index 9734b6037790c1779dfbd048a808ecaa6c2f1b40..6fb069733e33be18683646007a09e4ff337d281f 100644 (file)
@@ -127,6 +127,7 @@ LIMIT %s",
 }
 
 // Get total points left in doubler pot
+// @TODO This could be rewritten to a filter
 function getDoublerTotalPointsLeft() {
        // Initialize variables
        $points = '0';
@@ -137,16 +138,13 @@ function getDoublerTotalPointsLeft() {
        } // END - if
 
        if ((getConfig('doubler_jackpot') == 'Y') && (isExtensionActive('jackpot'))) {
-               // Load jackpot
-               $jackpot = getJackpotPoints();
-
-               if (!empty($jackpot)) $points += $jackpot;
+               // Get+add jackpot points
+               $points += getJackpotPoints();
        } // END - if
 
        if (isValidId(getDoublerUserid())) {
                // Get user's points
-               $user = getTotalPoints(getDoublerUserid());
-               $points += $user;
+               $points += getTotalPoints(getDoublerUserid());
        } // END - if
 
        // Return value