X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=inc%2Fautopurge%2Fpurge-mails.php;h=5236d22c07c913ac24479ab30a96c4d2f5a93388;hb=7d92d2652807c247558a1bcbd7dcd6574bd4645d;hp=1b4b39c19578979ca6d4d00b8675f524068383df;hpb=d495bd859975d08ee459d03c9b1cd51dd9b9304d;p=mailer.git diff --git a/inc/autopurge/purge-mails.php b/inc/autopurge/purge-mails.php index 1b4b39c195..5236d22c07 100644 --- a/inc/autopurge/purge-mails.php +++ b/inc/autopurge/purge-mails.php @@ -1,7 +1,7 @@ 0) { @@ -69,7 +69,9 @@ if (SQL_NUMROWS($result_mails) > 0) { // Okay we found some mails! SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_pool` WHERE `sender`=%s", array(bigintval($content['sender'])), __FILE__, __LINE__); - $DELETED += SQL_AFFECTEDROWS(); + + // Get all affected (deleted) rows + $deletedStats += SQL_AFFECTEDROWS(); // Reset query (to prevent possible errors) ...; $result_mails = SQL_QUERY("SELECT @@ -106,7 +108,9 @@ if (SQL_NUMROWS($result_mails) > 0) { // Okay we found some mails! SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_user_stats` WHERE `sender`=%s", array(bigintval($content['sender'])), __FILE__, __LINE__); - $DELETED += SQL_AFFECTEDROWS(); + + // Get all affected (deleted) rows + $deletedStats += SQL_AFFECTEDROWS(); // Reset query (to prevent possible errors) ... $result_mails = SQL_QUERY("SELECT @@ -125,9 +129,9 @@ ORDER BY SQL_FREERESULT($result_mails); // Do we have deleted mails and the admin want's to receive a notification -if (($DELETED > 0) && (getConfig('ap_dm_notify') == 'Y')) { +if (($deletedStats > 0) && (getConfig('ap_dm_notify') == 'Y')) { // Send out email to admin - sendAdminNotification(getMessage('AUTOPURGE_ADMIN_DEL_MAILS_SUBJECT'), 'admin_autopurge_del_mails', $DELETED, ''); + sendAdminNotification(getMessage('AUTOPURGE_ADMIN_DEL_MAILS_SUBJECT'), 'admin_autopurge_del_mails', $deletedStats); } // END - if //