X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=inc%2Flibs%2Fcache_functions.php;h=d4eccba5a347e35f02fbb52876a8091cc72bc23b;hb=f03cb5d87e69bb2efc885b5c5f5f3026b24c06f6;hp=f0d38e18d62b7c04367fb5dcc41f7f3a3c153502;hpb=0ee25da287821512e09137a752465f09b6e1a799;p=mailer.git diff --git a/inc/libs/cache_functions.php b/inc/libs/cache_functions.php index f0d38e18d6..d4eccba5a3 100644 --- a/inc/libs/cache_functions.php +++ b/inc/libs/cache_functions.php @@ -10,7 +10,12 @@ * -------------------------------------------------------------------- * * Kurzbeschreibung : Funktionen fuer die admins-Erweiterung * * -------------------------------------------------------------------- * - * * + * $Revision:: $ * + * $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 - 2008 by Roland Haeder * * For more information visit: http://www.mxchange.org * @@ -59,7 +64,7 @@ class CacheSystem { $this->path = $path; // Check if path exists - if ((is_dir($path)) && (!$tested)) { + if ((isDirectory($path)) && (!$tested)) { // Check if we can create a file inside the path touch($path."dummy.tmp", 'w'); if (FILE_READABLE($path."dummy.tmp")) { @@ -223,6 +228,7 @@ class CacheSystem { // Remove cache file from system //* DEBUG: */ print __METHOD__."(".__LINE__."): {$this->name} - DESTROYED!
\n"; unlink($this->fqfn); + // @TODO remove from $GLOBALS['cache_array']!!! // Is the file there? if (!$this->isCacheReadable()) { @@ -407,16 +413,15 @@ class CacheSystem { function isCacheReadable () { return INCLUDE_READABLE($this->inc); } + } // END - class // Destroy the cache on extension changes function FILTER_CACHE_DESTROY_ON_EXT_CHANGE ($data) { // Remove cache - if (EXT_IS_ACTIVE("cache")) { - if ($GLOBALS['cache_instance']->loadCacheFile("config")) $GLOBALS['cache_instance']->destroyCacheFile(); - if ($GLOBALS['cache_instance']->loadCacheFile("extensions")) $GLOBALS['cache_instance']->destroyCacheFile(); - if ($GLOBALS['cache_instance']->loadCacheFile("modreg")) $GLOBALS['cache_instance']->destroyCacheFile(); - } // END - if + if ($GLOBALS['cache_instance']->loadCacheFile("config")) $GLOBALS['cache_instance']->destroyCacheFile(); + if ($GLOBALS['cache_instance']->loadCacheFile("extensions")) $GLOBALS['cache_instance']->destroyCacheFile(); + if ($GLOBALS['cache_instance']->loadCacheFile("modreg")) $GLOBALS['cache_instance']->destroyCacheFile(); // Return it return $data; @@ -425,24 +430,21 @@ function FILTER_CACHE_DESTROY_ON_EXT_CHANGE ($data) { // Destroy the cache on changing admin function FILTER_CACHE_DESTROY_ON_ADMIN_CHANGE () { // Remove cache - if (EXT_IS_ACTIVE("cache")) { - if ($GLOBALS['cache_instance']->loadCacheFile("admins")) $GLOBALS['cache_instance']->destroyCacheFile(); - } // END - if + if ($GLOBALS['cache_instance']->loadCacheFile("admins")) $GLOBALS['cache_instance']->destroyCacheFile(); } // Destroy all cache files function FILTER_CACHE_DESTROY_ALL () { - // Remove cache - if (EXT_IS_ACTIVE("cache")) { - if ($GLOBALS['cache_instance']->loadCacheFile("admins")) $GLOBALS['cache_instance']->destroyCacheFile(); - if ($GLOBALS['cache_instance']->loadCacheFile("admins_acls")) $GLOBALS['cache_instance']->destroyCacheFile(); - if ($GLOBALS['cache_instance']->loadCacheFile("config")) $GLOBALS['cache_instance']->destroyCacheFile(); - if ($GLOBALS['cache_instance']->loadCacheFile("extensions")) $GLOBALS['cache_instance']->destroyCacheFile(); - if ($GLOBALS['cache_instance']->loadCacheFile("modreg")) $GLOBALS['cache_instance']->destroyCacheFile(); - if ($GLOBALS['cache_instance']->loadCacheFile("refdepths")) $GLOBALS['cache_instance']->destroyCacheFile(); - if ($GLOBALS['cache_instance']->loadCacheFile("refsystem")) $GLOBALS['cache_instance']->destroyCacheFile(); - if ($GLOBALS['cache_instance']->loadCacheFile("themes")) $GLOBALS['cache_instance']->destroyCacheFile(); - } // END - if + // Remove cache files + if ($GLOBALS['cache_instance']->loadCacheFile("admins")) $GLOBALS['cache_instance']->destroyCacheFile(); + if ($GLOBALS['cache_instance']->loadCacheFile("admins_acls")) $GLOBALS['cache_instance']->destroyCacheFile(); + if ($GLOBALS['cache_instance']->loadCacheFile("config")) $GLOBALS['cache_instance']->destroyCacheFile(); + if ($GLOBALS['cache_instance']->loadCacheFile("extensions")) $GLOBALS['cache_instance']->destroyCacheFile(); + if ($GLOBALS['cache_instance']->loadCacheFile("modreg")) $GLOBALS['cache_instance']->destroyCacheFile(); + if ($GLOBALS['cache_instance']->loadCacheFile("refdepths")) $GLOBALS['cache_instance']->destroyCacheFile(); + if ($GLOBALS['cache_instance']->loadCacheFile("refsystem")) $GLOBALS['cache_instance']->destroyCacheFile(); + if ($GLOBALS['cache_instance']->loadCacheFile("themes")) $GLOBALS['cache_instance']->destroyCacheFile(); + if ($GLOBALS['cache_instance']->loadCacheFile("revision")) $GLOBALS['cache_instance']->destroyCacheFile(); } // Filter for purging entire admin menu cache