************************************************************************/
// Some security stuff...
-if (ereg(basename(__FILE__), $_SERVER['PHP_SELF'])) {
+if (!defined('__SECURITY')) {
$INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
require($INC);
}
// Abort if autopurge is not active or disabled by admin
-if ((!EXT_IS_ACTIVE("autopurge")) || ($_CONFIG['auto_purge_active'] == "N")) {
+if ((!EXT_IS_ACTIVE("autopurge")) || (getConfig('auto_purge_active') == "N")) {
// Abort here
return false;
}
-if (($_CONFIG['auto_purge_active'] == "Y") && ($_CONFIG['auto_purge'] > 0)) {
+if ((getConfig('auto_purge_active') == "Y") && (getConfig('auto_purge') > 0)) {
// First calculate the timestamp
if (function_exists('CREATE_TIME_SELECTIONS')) {
- $PURGE = $_CONFIG['auto_purge'];
+ $PURGE = getConfig('auto_purge');
} else {
- $PURGE = $_CONFIG['auto_purge'] * 24 * 60 * 60;
+ $PURGE = getConfig('auto_purge') * getConfig('one_day');
}
// Init variables