Hi, i’ve solved the problem by myself adding a script in the footer of the skin (before the closure of the tag body).
I paste the code here, maybe this could help someone:
<?php //script svuota cache download manager
function isfile($file){ return preg_match('/^[^.^:^?^\-][^:^?]*\.(?i)' . getexts() . '$/',$file);}
function isfile_b($file){ if (strpos($file,'.zip.') !== false) {return true;} else {return false;}}
function getexts(){ return '(zip)'; }
$tempo= 3600*1; //ore * n ore
$path = $_SERVER['DOCUMENT_ROOT'].'/wp-content/plugins/download-manager/cache';
if ($handle = opendir($path)) {
while (false !== ($file = readdir($handle))) {
if (isfile($path."/".$file)) {
if(filectime($path."/".$file) < time() - $tempo){
unlink($path."/".$file);
}
}
else if (isfile_b($path.$file)) {
if(filectime($path."/".$file)
This script clean the zip files of the cache folder 1 hour older. The time can be setted in seconds in the variable $tempo