X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=inc%2Flibs%2Fautopurge_functions.php;h=fe3cdd4b586c22d6f55f2e95f96677966c55089b;hb=4cc62618b7a59c6641b057c34047b2dd531c16ad;hp=10cac374b030f6e551904b704bfce9e0630e6087;hpb=09f5758c42a33a56bdd461c946ffe759a59c54aa;p=mailer.git diff --git a/inc/libs/autopurge_functions.php b/inc/libs/autopurge_functions.php index 10cac374b0..fe3cdd4b58 100644 --- a/inc/libs/autopurge_functions.php +++ b/inc/libs/autopurge_functions.php @@ -40,7 +40,7 @@ // Some security stuff... if (!defined('__SECURITY')) { die(); -} +} // END - if // Add points in autopurge-mode function addPointsAutoPurge ($userid, $points) { @@ -48,8 +48,20 @@ function addPointsAutoPurge ($userid, $points) { addPointsDirectly('autopurge_add', $userid, $points); // Send out mail to user - $message = loadEmailTemplate('member_autopurge_points', translateComma($points), $userid); - sendEmail($userid, getMessage('AUTOPURGE_MEMBER_SUBJECT'), $message); + $message = loadEmailTemplate('member_autopurge_points', array('points' => $points), $userid); + sendEmail($userid, '{--AUTOPURGE_MEMBER_SUBJECT--}', $message); +} + +// Checks wether auto-purging is active +function isAutoPurgingActive () { + // Do we have cache? + if (!isset($GLOBALS['auto_purging_active'])) { + // Determine it + $GLOBALS['auto_purging_active'] = (getConfig('auto_purge_active') == 'Y'); + } // END - if + + // Return cache + return $GLOBALS['auto_purging_active']; } // [EOF]