// 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
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?