From ff5aed23a481670db60a5b80bc5e348434c5c75e Mon Sep 17 00:00:00 2001 From: Petr Skoda Date: Thu, 7 Jun 2012 11:04:35 +0200 Subject: [PATCH] MDL-33583 really keep all automated backup files when told to do so --- backup/util/helper/backup_cron_helper.class.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/backup/util/helper/backup_cron_helper.class.php b/backup/util/helper/backup_cron_helper.class.php index 0f79bfce85e..b768d0d39fd 100644 --- a/backup/util/helper/backup_cron_helper.class.php +++ b/backup/util/helper/backup_cron_helper.class.php @@ -461,6 +461,11 @@ abstract class backup_cron_automated_helper { $storage = $config->backup_auto_storage; $dir = $config->backup_auto_destination; + if ($keep == 0) { + // means keep all backup files + return true; + } + $backupword = str_replace(' ', '_', moodle_strtolower(get_string('backupfilename'))); $backupword = trim(clean_filename($backupword), '_');