More queries now depends on UNIX_TIMESTAMP() SQL function, wrong index in autopurge...
[mailer.git] / inc / modules / admin / what-list_bonus.php
index 274ec19..7b02b64 100644 (file)
@@ -70,7 +70,7 @@ if ($_CONFIG['bonus_active'] == "Y") {
        if (EXT_IS_ACTIVE("autopurge")) {
                // Use last online timestamp to keep inactive members away from here
                $LAST   = " AND last_online >= %s";
-               $ONLINE = bigintval(time() - $_CONFIG['ap_in_since']);
+               $ONLINE = bigintval(time() - $_CONFIG['ap_inactive_since']);
        }
 
        // Check if at least one is in the active rallye
@@ -127,7 +127,7 @@ ORDER BY active_bonus DESC, last_online DESC, userid",
                }
 
                // Prepare constant for timemark
-               define('__AUTOPURGE_TIMEOUT', MAKE_DATETIME(time() - $_CONFIG['ap_in_since'], "2"));
+               define('__AUTOPURGE_TIMEOUT', MAKE_DATETIME(time() - $_CONFIG['ap_inactive_since'], "2"));
 
                // Load final template
                LOAD_TEMPLATE("admin_list_bonus");