More rewrites to make use of (cached) wrapper functions
[mailer.git] / inc / libs / doubler_functions.php
index ba8b2902d08c525c4ed4d16c25da045b5e5b4f19..5e331bd71e3873c224bf336c71f0eb6a12d973c1 100644 (file)
@@ -86,7 +86,7 @@ LIMIT %s",
                        $limit
                ), __FUNCTION__, __LINE__);
 
-       if (SQL_NUMROWS($result) > 0) {
+       if (!SQL_HASZERONUMS($result)) {
                // List entries
                $OUT = '';
                while ($content = SQL_FETCHARRAY($result)) {
@@ -146,7 +146,7 @@ function getDoublerTotalPointsLeft() {
                if (!empty($jackpot)) $points += $jackpot;
        } // END - if
 
-       if (getConfig('doubler_userid') > 0) {
+       if (isValidUserId(getConfig('doubler_userid'))) {
                // Get user's points
                $user = countSumTotalData(getConfig('doubler_userid'), 'user_points', 'points');
                $points += $user;