More rewrites to make use of (cached) wrapper functions
[mailer.git] / inc / monthly / monthly_beg.php
index 1bdd5295acefb7eec61396a49d810ff367774b66..c74ea9f6c53734e8dce632f95b73aa27fff4b620 100644 (file)
@@ -57,7 +57,7 @@ if (($curr != getConfig('last_month')) && (getConfig('last_month') > 0) && (getC
        $whereStatement1 = '';
 
        // Shall we exclude webmaster's own userid?
-       if ((getConfig('beg_include_own') != 'Y') && (getConfig('beg_userid') > 0)) {
+       if ((getConfig('beg_include_own') != 'Y') && (isValidUserId(getConfig('beg_userid')))) {
                // Exclude it
                $whereStatement1 = " AND `userid` != {?beg_userid?}";
        } // END - if
@@ -84,7 +84,7 @@ ORDER BY
        `userid` ASC
 LIMIT {?beg_ranks?}", __FILE__, __LINE__);
 
-       if (SQL_NUMROWS($result_main) > 0) {
+       if (!SQL_HASZERONUMS($result_main)) {
                // Load our winners...
                while ($content = SQL_FETCHARRAY($result_main)) {
                        // Add points to user's account directly