X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=inc%2Flibs%2Fautopurge_functions.php;h=3d90fba9279d398cd68e0d20a5bf86c2163afc3f;hb=e46fa203829954370ce793156c78ce5c4600d020;hp=8d7ace168ddca39794a3d5663facafa9c4b9ea18;hpb=263a089d8a499e0e26d0af9e7aa7639f88b8ca60;p=mailer.git diff --git a/inc/libs/autopurge_functions.php b/inc/libs/autopurge_functions.php index 8d7ace168d..3d90fba927 100644 --- a/inc/libs/autopurge_functions.php +++ b/inc/libs/autopurge_functions.php @@ -18,6 +18,7 @@ * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * + * Copyright (c) 2009, 2010 by Mailer Developer Team * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -39,7 +40,7 @@ // Some security stuff... if (!defined('__SECURITY')) { die(); -} +} // END - if // Add points in autopurge-mode function addPointsAutoPurge ($userid, $points) { @@ -47,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, '{--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]