More queries now depends on UNIX_TIMESTAMP() not on time(), more fixes for not instal...
[mailer.git] / inc / modules / member / what-beg2.php
index 6a250924d50386cbb8a8d4e38a79788f1d943eb9..a7e131b107f495377f2163cdf76fdbd08e6e4e0e 100644 (file)
@@ -47,11 +47,10 @@ ADD_DESCR("member", basename(__FILE__));
 
 // Autopurge installed?
 $LAST = "%s"; $ONLINE = "";
-if (EXT_IS_ACTIVE("autopurge"))
-{
+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_inactive_since']);
+       $LAST   = " AND last_online >= (UNIX_TIMESTAMP() - %s)";
+       $ONLINE = $_CONFIG['ap_inactive_since'];
 }
 
 // Let's check if there are some points left we can "pay"...