Extension ext-coupon continued, a lot improvements applied:
[mailer.git] / inc / libs / bonus_functions.php
index db0a942de571c92be5943e51b26045cea3ef01d7..bd3948445860d43f39270df080dfdb1f82804aee 100644 (file)
@@ -268,7 +268,7 @@ function handleBonusPoints ($mode) {
 // Purges expired fast-click bonus entries
 function purgeExpiredTurboBonus() {
        // Remove entries
-       $result = SQL_QUERY('DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_bonus_turbo` WHERE `timemark` < (UNIX_TIMESTAMP() - {?bonus_timeout?})', __FUNCTION__, __LINE__);
+       $result = SQL_QUERY('DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_bonus_turbo` WHERE (UNIX_TIMESTAMP() - `timemark`) >= {?bonus_timeout?}', __FUNCTION__, __LINE__);
 
        if (!SQL_HASZEROAFFECTED()) {
                // Send out email to admin