} // END - if
// Abort if autopurge is not active or disabled by admin
-if ((!EXT_IS_ACTIVE("autopurge")) || ($_CONFIG['auto_purge_active'] == "N")) {
+if ((!EXT_IS_ACTIVE("autopurge")) || (getConfig('auto_purge_active') == "N")) {
// Abort here
return false;
} // END - if
// Search for mails from deleted members?
-if ($_CONFIG['ap_del_mails'] == "Y") {
+if (getConfig('ap_del_mails') == "Y") {
// Okay, let's check for them...
- $since = bigintval($_CONFIG['ap_dm_timeout']);
+ $since = bigintval(getConfig('ap_dm_timeout'));
$result_mails = SQL_QUERY_ESC("SELECT sender\
FROM "._MYSQL_PREFIX."_pool
WHERE data_type='DELETED' AND timestamp <= (UNIX_TIMESTAMP() - %s)
$DELETED += SQL_AFFECTEDROWS();
// Reset query (to prevent possible errors) ...
- $since = bigintval($_CONFIG['ap_dm_timeout']);
+ $since = bigintval(getConfig('ap_dm_timeout'));
$result_mails = SQL_QUERY_ESC("SELECT sender
FROM "._MYSQL_PREFIX."_pool
WHERE data_type='DELETED' AND timestamp <= (UNIX_TIMESTAMP() - %s)
SQL_FREERESULT($result_mails);
// Now let's check for stats entries as well
- $since = bigintval($_CONFIG['ap_dm_timeout']);
+ $since = bigintval(getConfig('ap_dm_timeout'));
$result_mails = SQL_QUERY_ESC("SELECT sender
FROM "._MYSQL_PREFIX."_user_stats
WHERE data_type='DELETED' AND timestamp_send <= (UNIX_TIMESTAMP() - %s)
$DELETED += SQL_AFFECTEDROWS();
// Reset query (to prevent possible errors) ...
- $since = bigintval($_CONFIG['ap_dm_timeout']);
+ $since = bigintval(getConfig('ap_dm_timeout'));
$result_mails = SQL_QUERY_ESC("SELECT sender
FROM "._MYSQL_PREFIX."_user_stats
WHERE data_type='DELETED' AND timestamp_send <= (UNIX_TIMESTAMP() - %s)
SQL_FREERESULT($result_mails);
// Do we have deleted mails and the admin want's to receive a notification
- if (($DELETED > 0) && ($_CONFIG['ap_dm_notify'] == "Y")) {
+ if (($DELETED > 0) && (getConfig('ap_dm_notify') == "Y")) {
// Send out email to admin
SEND_ADMIN_NOTIFICATION(AUTOPURGE_ADMIN_DEL_MAILS_SUBJECT, "admin_autopurge_del_mails", $DELETED, "");
}