From b296135a36be0397ea2156429da0cf7418272ddc Mon Sep 17 00:00:00 2001 From: "vincent@cubedesigners.com" Date: Fri, 17 Aug 2012 08:12:21 +0000 Subject: [PATCH] --- inc/commons/class.common.url.php | 28 --------------------- inc/ws/Controlleur/class.ws.maintenance.php | 28 +++++++++++++++++++++ 2 files changed, 28 insertions(+), 28 deletions(-) diff --git a/inc/commons/class.common.url.php b/inc/commons/class.common.url.php index 40ab39f3a..b8519c819 100644 --- a/inc/commons/class.common.url.php +++ b/inc/commons/class.common.url.php @@ -515,34 +515,6 @@ class commonUrl { exit; } - public static function cleanDownload($args) { - $root = ROOT . '/cache/download/'; - cubeFiles::scanRecursiveDir($root, $files); - $limit = TIME - 7200; - foreach ($files as $f) { - if (filemtime($f) < $limit) { - unlink($f); - } - } - $files = cubeFiles::scandir($root, true); - foreach ($files as $f) { - if (cubeFiles::isEmpty($f)) { - @rmdir($f); - } - } - } - - public static function deleteOldFilesFromFTP($args) { - global $core; - cubePHP::neverStop(); - - $dao = new commonDAOFichier($core->con); - $dao->deleteOldFiles(); - - cubeFiles::deleteFilesOlderThan('/home/ws/ftp', 60); - cubeFiles::deleteFilesOlderThan('/home/ws/www/getpdf', 60); - } - public static function adresse($utilisateur_id = null, $projet_id = null, $display = 'devis', $adresse = '') { global $core; $dao = new commonDAOClient($core->con); diff --git a/inc/ws/Controlleur/class.ws.maintenance.php b/inc/ws/Controlleur/class.ws.maintenance.php index 14e3f5f55..50ae963fb 100644 --- a/inc/ws/Controlleur/class.ws.maintenance.php +++ b/inc/ws/Controlleur/class.ws.maintenance.php @@ -750,6 +750,34 @@ class wsMaintenance { fb($svn->output); } + public static function cleanDownload($args) { + $root = ROOT . '/cache/download/'; + cubeFiles::scanRecursiveDir($root, $files); + $limit = TIME - 7200; + foreach ($files as $f) { + if (filemtime($f) < $limit) { + unlink($f); + } + } + $files = cubeFiles::scandir($root, true); + foreach ($files as $f) { + if (cubeFiles::isEmpty($f)) { + @rmdir($f); + } + } + } + + public static function deleteOldFilesFromFTP($args) { + global $core; + cubePHP::neverStop(); + + $dao = new commonDAOFichier($core->con); + $dao->deleteOldFiles(); + + cubeFiles::deleteFilesOlderThan('/home/ws/ftp', 60); + cubeFiles::deleteFilesOlderThan('/home/ws/www/getpdf', 60); + } + } ?> \ No newline at end of file -- 2.39.5