From 49f14b289345b337b6e1b1d10151cdebd5f3a42d Mon Sep 17 00:00:00 2001 From: Yannick Warnier Date: Sun, 17 Jul 2011 09:44:11 -0500 Subject: [PATCH] Minor - update function name --- main/cron/cleanup.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/main/cron/cleanup.php b/main/cron/cleanup.php index 2f445639c8..5e0bcde01c 100644 --- a/main/cron/cleanup.php +++ b/main/cron/cleanup.php @@ -9,7 +9,7 @@ foreach($list as $item) { $stat = @stat($a_dir.'/'.$item); if ($stat === false) { error_log('Cron task cannot stat '.$a_dir.'/'.$item); continue; } if ($stat['mtime'] > $t) { //if the file is older than one week, delete - recursiveDelete($a_dir.'/'.$item); + recursive_delete($a_dir.'/'.$item); } } @@ -18,15 +18,15 @@ foreach($list as $item) { * * @param string $str Path to file or directory */ -function recursiveDelete($str){ +function recursive_delete($str){ if(is_file($str)){ return @unlink($str); } elseif(is_dir($str)){ $scan = glob(rtrim($str,'/').'/*'); foreach($scan as $index=>$path){ - recursiveDelete($path); + recursive_delete($path); } return @rmdir($str); } -} \ No newline at end of file +}