]> git.mxchange.org Git - mailer.git/commitdiff
RDF cache garbage collector does no longer kill MXChange cache files
authorRoland Häder <roland@mxchange.org>
Fri, 12 Sep 2008 12:22:51 +0000 (12:22 +0000)
committerRoland Häder <roland@mxchange.org>
Fri, 12 Sep 2008 12:22:51 +0000 (12:22 +0000)
inc/databases.php
inc/rdf.class.php

index ad211969f34004b2e93398966e229d6c03bd64b8..28f1bb91541e5207b47020bd9bc2b60f2536936f 100644 (file)
@@ -114,7 +114,7 @@ define('USAGE_BASE', "usage");
 define('SERVER_URL', "http://www.mxchange.org");
 
 // This current patch level
-define('CURR_SVN_REVISION', "307");
+define('CURR_SVN_REVISION', "308");
 
 // Take a prime number which is long (if you know a longer one please try it out!)
 define('_PRIME', 591623);
index 350976fde67b23b6b3cab9bb9b5c021b46dc4706..beaf027feb99179938c2f5aec14eabba8e503833 100644 (file)
@@ -1205,8 +1205,8 @@ class fase4_rdf {
         if (rand(1, 100) <= $this->gc_probability) {
             $dir = dir($this->_cache_dir);
             while($file=$dir->read()) {
-                if($file!="." AND $file!=".." AND filemtime($dir->path.$file) <= time() - $this->_refresh )  {
-                @unlink($dir->path.$file);
+                if (is_file($dir->path.$file) && substr($file, -6, 6) != ".cache" && filemtime($dir->path.$file) <= time() - $this->_refresh )  {
+                       @unlink($dir->path.$file);
                 }
         }
         $dir->close();