// Constructor
function mxchange_cache($interval, $path, $tested) {
+ // Failed is the default
+ $this->ret = "failed";
+
// Remember interval in class
- $this->update_interval=$interval;
+ $this->update_interval = $interval;
// Remeber path
- $this->cache_path=$path;
+ $this->cache_path = $path;
// Check if path exists
if ((is_dir($path)) && (!$tested)) {
UPDATE_CONFIG("cache_tested", 1);
// All done!
- return "done";
+ $this->ret = "done";
} else {
// Stop! Set a .htaccess file first
- $this->ret="htaccess";
- return "htaccess";
+ $this->ret = "htaccess";
}
}
} elseif ($tested) {
// System already tested
- $this->ret="done";
- return "done";
+ $this->ret = "done";
}
-
- // Something goes wrong here!
- $this->ret="failed";
- return "failed";
}
function cache_file($file, $ignore_ctime=false) {
// Return line
return $line;
}
+
+ function getStatus () {
+ return $this->ret;
+ }
}
//
?>