]> git.mxchange.org Git - mailer.git/blobdiff - inc/autopurge/purge-inact.php
More rewrites to make use of (cached) wrapper functions
[mailer.git] / inc / autopurge / purge-inact.php
index 74dd7469a14577fc6becaa474bcc9d51fd868393..4a0ef168653731e83a6832201ed8177eec766721 100644 (file)
@@ -56,10 +56,7 @@ if (getConfig('autopurge_inactive') == 'Y') {
        // Init exclusion list
        // @TODO Rewrite these if() blocks to a filter
        $EXCLUDE_LIST = '';
-       if (getConfig('def_refid') > 0) {
-               $EXCLUDE_LIST = ' AND d.`userid` != {?def_refid?}';
-       } // END - if
-
+       if (isValidUserId(getConfig('def_refid'))) $EXCLUDE_LIST .= ' AND d.`userid` != {?def_refid?}';
        // Check for more extensions
        if (isExtensionActive('beg'))     $EXCLUDE_LIST .= ' AND d.`userid` != {?beg_userid?}';
        if (isExtensionActive('bonus'))   $EXCLUDE_LIST .= ' AND d.`userid` != {?bonus_userid?}';
@@ -89,7 +86,7 @@ ORDER BY
                        getApInactiveSince()
                ), __FILE__, __LINE__);
 
-       if (SQL_NUMROWS($result_inactive) > 0) {
+       if (!SQL_HASZERONUMS($result_inactive)) {
                // Prepare variables and constants...
                $useridsContent = '';
                $content['since'] = (getApInactiveSince() / 60 / 60);
@@ -140,7 +137,7 @@ WHERE
 ORDER BY
        `userid` ASC", __FILE__, __LINE__);
 
-       if (SQL_NUMROWS($result_inactive) > 0) {
+       if (!SQL_HASZERONUMS($result_inactive)) {
                // Prepare variable...
                $useridsContent = '';