<?php
/************************************************************************
- * MXChange v0.2.1 Start: 10/11/2003 *
- * =============== Last change: 10/11/2003 *
+ * Mailer v0.2.1-FINAL Start: 10/11/2003 *
+ * =================== Last change: 10/11/2003 *
* *
* -------------------------------------------------------------------- *
* File : admins_functions.php *
* $Date:: $ *
* $Tag:: 0.2.1-FINAL $ *
* $Author:: $ *
- * Needs to be in all Files and every File needs "svn propset *
- * svn:keywords Date Revision" (autoprobset!) at least!!!!!! *
* -------------------------------------------------------------------- *
* Copyright (c) 2003 - 2009 by Roland Haeder *
- * 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 *
die();
} // END - if
-// Destroy the cache on extension changes
-function FILTER_CACHE_DESTROY_ON_EXT_CHANGE ($data) {
- // Return the data anyway if there is no cache extension
- if (!isCacheInstanceValid()) return $data;
-
- // Remove cache
- foreach (array('config','extensions','modreg') as $cache) {
- if ($GLOBALS['cache_instance']->loadCacheFile($cache)) $GLOBALS['cache_instance']->removeCacheFile(false);
- } // END - foreach
-
- // Return it
- return $data;
-}
-
-// Destroy the cache on changing admin
-function FILTER_CACHE_DESTROY_ON_ADMIN_CHANGE ($data) {
- // Skip this step if the cache instance is not there
- if (!isCacheInstanceValid()) return false;
-
- // Remove cache
- if ($GLOBALS['cache_instance']->loadCacheFile('admins')) $GLOBALS['cache_instance']->removeCacheFile(false);
-
- // Return the data
- return $data;
-}
-
-// Destroy all cache files
-function FILTER_CACHE_DESTROY_ALL () {
- // Skip this step if the cache instance is not there
- //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Called!');
- if (!isCacheInstanceValid()) return false;
-
- // Remove cache files
- foreach (array('admins','admins_acls','config','extensions','modreg','refdepths','refsystem','themes','revision','filter','imprint') as $cache) {
- /* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, sprintf("Trying to remove cache %s.", $cache));
- if ($GLOBALS['cache_instance']->loadCacheFile($cache)) $GLOBALS['cache_instance']->removeCacheFile(false);
- } // END - foreach
- //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Done!');
-}
-
-// Filter for purging 'filter' cache
-function FILTER_CACHE_DESTROY_FILTER () {
- // Skip this step if the cache instance is not there
- if ((!isCacheInstanceValid()) || (getConfig('update_filter_usage') != 'Y')) return false;
-
- // Remove cache files
- if ($GLOBALS['cache_instance']->loadCacheFile('filter')) $GLOBALS['cache_instance']->removeCacheFile(false);
-}
-
// [EOF]
?>