]> git.mxchange.org Git - mailer.git/blobdiff - inc/modules/admin/what-list_autopurge.php
Even more usage of EL
[mailer.git] / inc / modules / admin / what-list_autopurge.php
index 027187be6d2f156c6a2eed07fd4b04fd3ad2fa09..1d2cd22b690e3be7708ade1ab7d061062e89af8d 100644 (file)
@@ -48,11 +48,7 @@ addMenuDescription('admin', __FILE__);
 // Exclude default referal id if set
 // @TODO Rewrite those lines to filter
 $EXCLUDE_LIST = '';
-if (getConfig('def_refid') > 0) {
-       $EXCLUDE_LIST = ' AND d.userid != {?def_refid?}';
-} // END - if
-
-// Check for more extensions
+if (getConfig('def_refid') > 0)                $EXCLUDE_LIST .= ' AND d.userid != {?def_refid?}';
 if (isExtensionActive('beg'))                  $EXCLUDE_LIST .= ' AND d.userid != {?beg_userid?}';
 if (isExtensionActive('bonus'))                $EXCLUDE_LIST .= ' AND d.userid != {?bonus_userid?}';
 if (isExtensionActive('doubler'))              $EXCLUDE_LIST .= ' AND d.userid != {?doubler_userid?}';
@@ -72,13 +68,12 @@ WHERE
 ORDER BY
        d.userid ASC", __FILE__, __LINE__);
 
-if (SQL_NUMROWS($result) > 0) {
+if (!SQL_HASZERONUMS($result)) {
        // Ok, we have found some inactive accounts
-       $OUT = ''; $SW = 2;
+       $OUT = '';
        while ($content = SQL_FETCHARRAY($result)) {
                // Prepare data for the row template
                $content = array(
-                       'sw'          => $SW,
                        'userid'      => $content['userid'],
                        'gender'      => $content['gender'],
                        'surname'     => $content['surname'],
@@ -91,8 +86,7 @@ if (SQL_NUMROWS($result) > 0) {
 
                // Load row template
                $OUT .= loadTemplate('admin_list_autopurge_row', true, $content);
-               $SW = 3 - $SW;
-       }
+       } // END - while
 
        // Free memory
        SQL_FREERESULT($result);