Permalink
Browse files

MDL-33531 backup Added format_string to course shortname

  • Loading branch information...
1 parent 4af5c4e commit 3de32f8558831e3638272f3208c19d34d86146ba @dmonllao dmonllao committed Jul 16, 2012
Showing with 2 additions and 1 deletion.
  1. +2 −1 backup/util/helper/backup_cron_helper.class.php
@@ -512,7 +512,8 @@ public static function remove_excess_backups($course) {
// MDL-33531: use different filenames depending on backup_shortname option
if ( !empty($config->backup_shortname) ) {
- $courseref = $course->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 {

0 comments on commit 3de32f8

Please sign in to comment.