]> git.mxchange.org Git - mailer.git/blobdiff - inc/autopurge.php
Some functions rewritten to hungarian notation, handling of array rewritten
[mailer.git] / inc / autopurge.php
index c01be283639f223411f564b30cc1ff3ab2bbcd98..75bddcd86b15f2864ccb3d377222099beda077e1 100644 (file)
@@ -32,7 +32,7 @@
  ************************************************************************/
 
 // 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);
 } // END - if
@@ -40,23 +40,11 @@ if (ereg(basename(__FILE__), $_SERVER['PHP_SELF'])) {
 // Load all includes
 $INC_POOL = GET_DIR_AS_ARRAY(PATH."inc/autopurge/", "purge-");
 
-// Include them all
-foreach ($INC_POOL as $fqfn) {
-       // Load them only once
-       require_once($fqfn);
-} // END - foreach
+// Run the filter
+RUN_FILTER('load_includes', $INC_POOL);
 
-if (EXT_IS_ACTIVE("rallye")) {
-       // Check expired rallyes (hard-coded 3 days limit for displaying expired rallyes!)
-       require_once(PATH."inc/libs/rallye_functions.php");
-       RALLYE_DELETE_EXPIRED_RALLYES();
-}
-
-if (EXT_IS_ACTIVE("bonus")) {
-       // Check for expired turbo bonus lines
-       require_once(PATH."inc/libs/bonus_functions.php");
-       BONUS_PURGE_EXPIRED_TURBO_BONUS();
-}
+// Run filters for extra autopurge
+RUN_FILTER('extra_autopurge');
 
 //
 ?>