]> git.mxchange.org Git - mailer.git/blobdiff - inc/libs/cache_functions.php
New function isDirectory() introduced, fixed GET_DIR_AS_ARRAY() (replaces scandir())
[mailer.git] / inc / libs / cache_functions.php
index f8ff4882a08ba678ded9c0534aeee39f77d8d53f..8ef45755e83065b164b2d75320bec6a415c0c957 100644 (file)
@@ -11,9 +11,9 @@
  * Kurzbeschreibung  : Funktionen fuer die admins-Erweiterung           *
  * -------------------------------------------------------------------- *
  * $Revision:: 856                                                    $ *
- * $Date:: 2009-03-06 20:24:32 +0100 (Fr, 06. Mär 2009)              $ *
+ * $Date::                                                            $ *
  * $Tag:: 0.2.1-FINAL                                                 $ *
- * $Author:: stelzi                                                   $ *
+ * $Author::                                                          $ *
  * Needs to be in all Files and every File needs "svn propset           *
  * svn:keywords Date Revision" (autoprobset!) at least!!!!!!            *
  * -------------------------------------------------------------------- *
@@ -64,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")) {
@@ -413,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;
@@ -431,25 +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();
-               if ($GLOBALS['cache_instance']->loadCacheFile("revision"))    $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