]> git.mxchange.org Git - mailer.git/blobdiff - inc/autopurge/purge-general.php
Extension ext-coupon continued, a lot improvements applied:
[mailer.git] / inc / autopurge / purge-general.php
index fb30bb928c9066080e0ba333f271f47589d54087..30c18977e406b2e62e40ac4afdffd2be1ade0adf 100644 (file)
@@ -17,7 +17,7 @@
  * $Author::                                                          $ *
  * -------------------------------------------------------------------- *
  * Copyright (c) 2003 - 2009 by Roland Haeder                           *
- * Copyright (c) 2009, 2010 by Mailer Developer Team                    *
+ * Copyright (c) 2009 - 2011 by Mailer Developer Team                   *
  * For more information visit: http://www.mxchange.org                  *
  *                                                                      *
  * This program is free software; you can redistribute it and/or modify *
@@ -59,9 +59,9 @@ FROM
 LEFT JOIN
        `{?_MYSQL_PREFIX?}_payments` AS t
 ON
-       s.payment_id=t.id
+       s.`payment_id`=t.`id`
 WHERE
-       s.timestamp_ordered <= (UNIX_TIMESTAMP() - {?auto_purge?})
+       (UNIX_TIMESTAMP() - s.`timestamp_ordered`) >= {?auto_purge?}
 ORDER BY
        s.userid ASC', __FILE__, __LINE__);
        if (!SQL_HASZERONUMS($result)) {
@@ -144,12 +144,12 @@ ORDER BY
        // Add points from deleted accounts to jackpot, but here just add to notify mail
        if ($admin_points > 0) {
                // Send mail to admin
-               sendAdminNotification('{--ADMIN_AUTOPURGE_SUBJECT--}', 'admin_autopurge_points', translateComma($admin_points));
+               sendAdminNotification('{--ADMIN_AUTOPURGE_SUBJECT--}', 'admin_autopurge_points', $admin_points);
        } // END - if
 
        // Run all SQLs here
        runFilterChain('run_sqls');
 } // END - if
 
-//
+// [EOF]
 ?>