* -------------------------------------------------------------------- *
* Kurzbeschreibung : Funktionen fuer die admins-Erweiterung *
* -------------------------------------------------------------------- *
- * $Revision:: 856 $ *
+ * $Revision:: $ *
* $Date:: $ *
* $Tag:: 0.2.1-FINAL $ *
* $Author:: $ *
if ($this->ret == "done") {
// Create file
if ($this->isCacheReadable()) chmod($this->fqfn, 0666);
- $this->pointer = fopen($this->fqfn, 'w') or mxchange_die("Cannot write to cache ".$this->fqfn." !");
+ $this->pointer = fopen($this->fqfn, 'w') or app_die(__METHOD__, __LINE__, "Cannot write to cache ".$this->fqfn." !");
// Add open PHP tag
fwrite($this->pointer, "<?php\n");
// 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
if ($GLOBALS['cache_instance']->loadCacheFile("config")) $GLOBALS['cache_instance']->destroyCacheFile();
if ($GLOBALS['cache_instance']->loadCacheFile("extensions")) $GLOBALS['cache_instance']->destroyCacheFile();
// Destroy the cache on changing admin
function FILTER_CACHE_DESTROY_ON_ADMIN_CHANGE () {
+ // 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']->destroyCacheFile();
}
// Destroy all cache files
function FILTER_CACHE_DESTROY_ALL () {
+ // Skip this step if the cache instance is not there
+ if (!isCacheInstanceValid()) return false;
+
// Remove cache files
if ($GLOBALS['cache_instance']->loadCacheFile("admins")) $GLOBALS['cache_instance']->destroyCacheFile();
if ($GLOBALS['cache_instance']->loadCacheFile("admins_acls")) $GLOBALS['cache_instance']->destroyCacheFile();