X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;ds=sidebyside;f=inc%2Flibs%2Fautopurge_functions.php;h=176e6e40c43ed5f846cee239e7093b99d834e203;hb=5736dfb1b51bff78b3594a166f350e76784fa0ff;hp=8c5372fd113553a9ea909716d9e3f16930ee094c;hpb=deb6e298d51b4531a8b782d29613746de1f5cee2;p=mailer.git diff --git a/inc/libs/autopurge_functions.php b/inc/libs/autopurge_functions.php index 8c5372fd11..176e6e40c4 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[__FUNCTION__])) { + // Determine it + $GLOBALS[__FUNCTION__] = (getConfig('auto_purge_active') == 'Y'); + } // END - if + + // Return cache + return $GLOBALS[__FUNCTION__]; } // [EOF]