MDL-33812 Backup: Revert MDL-33521
This commit is contained in:
@@ -530,18 +530,7 @@ abstract class backup_cron_automated_helper {
|
||||
if (!empty($dir) && ($storage == 1 || $storage == 2)) {
|
||||
// Calculate backup filename regex, ignoring the date/time/info parts that can be
|
||||
// variable, depending of languages, formats and automated backup settings
|
||||
|
||||
|
||||
// MDL-33531: use different filenames depending on backup_shortname option
|
||||
if ( !empty($config->backup_shortname) ) {
|
||||
$context = get_context_instance(CONTEXT_COURSE, $course->id);
|
||||
$courseref = format_string($course->shortname, true, array('context' => $context));
|
||||
$courseref = str_replace(' ', '_', $courseref);
|
||||
$courseref = textlib::strtolower(trim(clean_filename($courseref), '_'));
|
||||
} else {
|
||||
$courseref = $course->id;
|
||||
}
|
||||
$filename = $backupword . '-' . backup::FORMAT_MOODLE . '-' . backup::TYPE_1COURSE . '-' .$courseref . '-';
|
||||
$filename = $backupword . '-' . backup::FORMAT_MOODLE . '-' . backup::TYPE_1COURSE . '-' .$course->id . '-';
|
||||
$regex = '#^'.preg_quote($filename, '#').'.*\.mbz$#';
|
||||
|
||||
// Store all the matching files into fullpath => timemodified array
|
||||
|
||||
Reference in New Issue
Block a user