X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=inc%2Flibs%2Fautopurge_functions.php;h=3d90fba9279d398cd68e0d20a5bf86c2163afc3f;hb=0187fd5903cddd98c2152dbb4c84da58e5083303;hp=8c5372fd113553a9ea909716d9e3f16930ee094c;hpb=5f243a44fd58ab847198294f23b022fcefd6e334;p=mailer.git diff --git a/inc/libs/autopurge_functions.php b/inc/libs/autopurge_functions.php index 8c5372fd11..3d90fba927 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) { @@ -49,7 +49,19 @@ function addPointsAutoPurge ($userid, $points) { // Send out mail to user $message = loadEmailTemplate('member_autopurge_points', array('points' => $points), $userid); - sendEmail($userid, getMessage('AUTOPURGE_MEMBER_SUBJECT'), $message); + sendEmail($userid, '{--MEMBER_AUTOPURGE_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]