]> git.mxchange.org Git - mailer.git/blobdiff - inc/autopurge/purge-general.php
Mahor rewrite:
[mailer.git] / inc / autopurge / purge-general.php
index 95a88e9a7b6df4645b8cf970c4ca5aee735fa69b..6b5e36b990b1d46cb854c20f0d03b69b56f898d1 100644 (file)
  ************************************************************************/
 
 // 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