From 2589eb89f0bfa19b23b2c7da6a7bfadbf9835ea3 Mon Sep 17 00:00:00 2001 From: Sam Hemelryk Date: Fri, 30 Apr 2010 03:02:36 +0000 Subject: [PATCH] backup MDL-22251 fixed issue with delete_old_backup_dirs passing a full path rather than a backupid --- backup/util/helper/backup_helper.class.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/backup/util/helper/backup_helper.class.php b/backup/util/helper/backup_helper.class.php index 63ea5c4f517..2e44b7a4fef 100644 --- a/backup/util/helper/backup_helper.class.php +++ b/backup/util/helper/backup_helper.class.php @@ -59,7 +59,7 @@ abstract class backup_helper { return rmdir($CFG->dataroot . '/temp/backup/' . $backupid); } - /** + /** * Given one fullpath to directory, delete its contents recursively * Copied originally from somewhere in the net. * TODO: Modernise this @@ -137,7 +137,8 @@ abstract class backup_helper { if ($status && $moddate < $deletefrom) { //If directory, recurse if (is_dir($file_path)) { - $status = self::delete_backup_dir($file_path); + // $file is really the backupid + $status = self::delete_backup_dir($file); //If file } else { unlink($file_path);