New function isValidUserid() introduced, more rewrites to EL:
[mailer.git] / inc / mails / doubler_mails.php
index 975fae07e96946c894b5887f3ce3e9a5ded1b5e4..d2cca8e044ac7c38d65a225140fdade5d8944307 100644 (file)
@@ -48,8 +48,8 @@ if (!defined('__SECURITY')) {
 if (getOutputMode() != 0) return;
 
 // Initialize variables
-$jackpot = '0'; $user = '0';
-if (isExtensionActive('jackpot')) $jackpot = getJackpotPoints();
+$jackpotPoints = '0'; $userPoints = '0';
+if (isExtensionActive('jackpot')) $jackpotPoints = getJackpotPoints();
 
 // Get total points of the doubler itself
 $DOUBLER_POINTS = DOUBLER_GET_TOTAL_POINTS_LEFT();
@@ -146,17 +146,17 @@ if (((SQL_NUMROWS($result_total) > 0) && (getConfig('doubler_sent_all') == 'Y'))
                        $okay = false;
 
                        // Check for jackpot inclusion in doubling process
-                       if (($jackpot > 0) && ($jackpot >= $content['points']) && (getConfig('doubler_jackpot') == 'Y')) {
+                       if (($jackpotPoints > 0) && ($jackpotPoints >= $content['points']) && (getConfig('doubler_jackpot') == 'Y')) {
                                // Subtract points from jackpot
                                subtractPointsFromJackpot($content['points']);
-                               $jackpot -= $content['points'];
+                               $jackpotPoints -= $content['points'];
 
                                // Okay, done!
                                $okay = true;
                        } // END - if
 
                        // Exclude also webmaster's id in taking points from webmaster's account
-                       if (($user > 0) && ($user >= $content['points']) && ($okay === false) && (getConfig('doubler_userid') > 0) && ($content['userid'] != getConfig('doubler_userid'))) {
+                       if (($userPoints > 0) && ($userPoints >= $content['points']) && ($okay === false) && (getConfig('doubler_userid') > 0) && ($content['userid'] != getConfig('doubler_userid'))) {
                                // Add points to used points
                                subtractPoints('doubler_payout', getConfig('doubler_userid'), $content['points']);