]> git.mxchange.org Git - mailer.git/blobdiff - inc/filter/cache_filter.php
Code improved:
[mailer.git] / inc / filter / cache_filter.php
index 704d3e8f3c74cfc56f15a313df6be84e01794093..7ef4dd33aabb10100632cf97bfa780317515312c 100644 (file)
@@ -16,8 +16,8 @@
  * $Author::                                                          $ *
  * -------------------------------------------------------------------- *
  * Copyright (c) 2003 - 2009 by Roland Haeder                           *
- * Copyright (c) 2009 - 2011 by Mailer Developer Team                   *
- * For more information visit: http://www.mxchange.org                  *
+ * Copyright (c) 2009 - 2012 by Mailer Developer Team                   *
+ * For more information visit: http://mxchange.org                      *
  *                                                                      *
  * This program is free software; you can redistribute it and/or modify *
  * it under the terms of the GNU General Public License as published by *
@@ -41,7 +41,7 @@ if (!defined('__SECURITY')) {
 } // END - if
 
 // Destroy the cache on extension changes
-function FILTER_CACHE_DESTROY_ON_EXT_CHANGE ($data) {
+function FILTER_CACHE_DESTROY_ON_EXT_CHANGE ($filterData) {
        // Return the data anyway if there is no cache extension
        //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Called!');
        if (!isCacheInstanceValid()) {
@@ -49,19 +49,21 @@ function FILTER_CACHE_DESTROY_ON_EXT_CHANGE ($data) {
        } // END - if
 
        // Remove cache
-       foreach (array('config','extension','filter','modules') as $cache) {
+       foreach (array('config', 'extension', 'filter', 'modules', 'earning', 'points_data') as $cache) {
+               // Is this cache there?
                if ($GLOBALS['cache_instance']->loadCacheFile($cache)) {
+                       // Yes, then remove it
                        $GLOBALS['cache_instance']->removeCacheFile();
                } // END - if
        } // END - foreach
 
        // Return it
        //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Done!');
-       return $data;
+       return $filterData;
 }
 
 // Destroy the cache on changing admin
-function FILTER_CACHE_DESTROY_ON_ADMIN_CHANGE ($data) {
+function FILTER_CACHE_DESTROY_ON_ADMIN_CHANGE ($filterData) {
        // Skip this step if the cache instance is not there
        //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Called!');
        if (!isCacheInstanceValid()) {
@@ -75,11 +77,11 @@ function FILTER_CACHE_DESTROY_ON_ADMIN_CHANGE ($data) {
 
        // Return the data
        //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Done!');
-       return $data;
+       return $filterData;
 }
 
 // Destroy all cache files
-function FILTER_CACHE_DESTROY_ALL ($data) {
+function FILTER_CACHE_DESTROY_ALL ($filterData) {
        // Skip this step if the cache instance is not there
        //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Called!');
        if (!isCacheInstanceValid()) {
@@ -87,7 +89,7 @@ function FILTER_CACHE_DESTROY_ALL ($data) {
        } // END - if
 
        // Remove cache files
-       foreach (array('admin','admin_acls','config','extension','modules','refdepths','refsystem','themes','filter','imprint') as $cache) {
+       foreach (array('admin', 'admin_acls', 'config', 'extension', 'earning', 'filter', 'imprint', 'modules', 'points_data', 'refdepths', 'refsystem', 'themes') as $cache) {
                // Is the cache file readable?
                // @TODO This should be rewritten not to load the cache file for just checking if it is there for save removal.
                if ($GLOBALS['cache_instance']->loadCacheFile($cache)) {
@@ -97,11 +99,11 @@ function FILTER_CACHE_DESTROY_ALL ($data) {
        } // END - foreach
 
        //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Done!');
-       return $data;
+       return $filterData;
 }
 
 // Filter for purging 'filter' cache
-function FILTER_CACHE_DESTROY_FILTER ($data) {
+function FILTER_CACHE_DESTROY_FILTER ($filterData) {
        // Skip this step if the cache instance is not there
        //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Called!');
        if ((!isCacheInstanceValid()) || ((isConfigEntrySet('update_filter_usage')) && (getConfig('update_filter_usage') != 'Y'))) {
@@ -114,7 +116,7 @@ function FILTER_CACHE_DESTROY_FILTER ($data) {
        } // END - if
 
        //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Done!');
-       return $data;
+       return $filterData;
 }
 
 // [EOF]