X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=inc%2Flibs%2Fautopurge_functions.php;h=e66c107b61f9a6ee07da4ab8dd20549251dbbaaa;hb=c0c6d5d58bdecd22bdcf7dfe5b24bec69e1810c7;hp=a8ecdd1771ab09d833cefc5ebefe83404e0b959e;hpb=c5e4e7531db6a636c66ba2e672b832f9a13be648;p=mailer.git diff --git a/inc/libs/autopurge_functions.php b/inc/libs/autopurge_functions.php index a8ecdd1771..e66c107b61 100644 --- a/inc/libs/autopurge_functions.php +++ b/inc/libs/autopurge_functions.php @@ -43,7 +43,7 @@ if (!defined('__SECURITY')) { // Add points in autopurge-mode function addPointsAutoPurge ($userid, $points) { // Is the userid valid? - if (!isValidUserId($userid)) { + if ((!isValidId($userid)) || ($points <= 0)) { // Please report all these bugs reportBug(__FUNCTION__, __LINE__, 'Invalid call. userid=' . $userid . ',points=' . $points); } // END - if @@ -109,6 +109,18 @@ function getApInactiveTime () { return $GLOBALS[__FUNCTION__]; } +// "Getter" for auto_purge +function getAutoPurge () { + // Is there cache? + if (!isset($GLOBALS[__FUNCTION__])) { + // Determine it + $GLOBALS[__FUNCTION__] = getConfig('auto_purge'); + } // END - if + + // Return cache + return $GLOBALS[__FUNCTION__]; +} + // "Getter" for ap_dm_timeout function getApDmTimeout () { // Is there cache?