More queries now depends on UNIX_TIMESTAMP() SQL function, wrong index in autopurge...
[mailer.git] / inc / libs / task_functions.php
index 2eca98fd20baa12c5b80023f5dbe6bf681d0da83..1aced16f60ee5ed4cb060d3ad899bdd6d5992617 100644 (file)
@@ -272,7 +272,7 @@ function OUTPUT_ADVANCED_OVERVIEW (&$result_main)
 
        if (EXT_IS_ACTIVE("autopurge")) {
                // Start finding them...
-               $since = (time() - $_CONFIG['ap_in_since']);
+               $since = (time() - $_CONFIG['ap_inactive_since']);
                $EXCLUDE_LIST = " AND d.userid != ".$_CONFIG['def_refid']."";
 
                // Check for more extensions
@@ -354,10 +354,10 @@ ORDER BY d.userid";
 
                // Autopurge installed?
                $LAST = ""; $ONLINE = "";
-               if ((EXT_IS_ACTIVE("autopurge")) && ($_CONFIG['ap_inactive'] == "Y") && ($_CONFIG['ap_in_since'] > 0)) {
+               if ((EXT_IS_ACTIVE("autopurge")) && ($_CONFIG['ap_inactive'] == "Y") && ($_CONFIG['ap_inactive_since'] > 0)) {
                        // Use last online timestamp to keep inactive members away from here
                        $LAST   = " AND last_online >= ";
-                       $ONLINE = bigintval(time() - $_CONFIG['ap_in_since']);
+                       $ONLINE = bigintval(time() - $_CONFIG['ap_inactive_since']);
                }
 
                $SQLs[]   = "SELECT ".$USE." AS active_bonus FROM "._MYSQL_PREFIX."_user_data
@@ -373,10 +373,10 @@ ORDER BY active_bonus DESC, userid";
 
                // Autopurge installed?
                $LAST = ""; $ONLINE = "";
-               if ((EXT_IS_ACTIVE("autopurge")) && ($_CONFIG['ap_inactive'] == "Y") && ($_CONFIG['ap_in_since'] > 0)) {
+               if ((EXT_IS_ACTIVE("autopurge")) && ($_CONFIG['ap_inactive'] == "Y") && ($_CONFIG['ap_inactive_since'] > 0)) {
                        // Use last online timestamp to keep inactive members away from here
                        $LAST   = " AND last_online >= ";
-                       $ONLINE = bigintval(time() - $_CONFIG['ap_in_since']);
+                       $ONLINE = bigintval(time() - $_CONFIG['ap_inactive_since']);
                }
 
                $SQLs[]   = "SELECT userid FROM "._MYSQL_PREFIX."_user_data