From 11db6f92a26c8ef1f67b33c2d6be2a7638c636ec Mon Sep 17 00:00:00 2001 From: stronk7 Date: Thu, 18 Sep 2003 17:43:52 +0000 Subject: [PATCH] Now more characters are replaced in the backup filename. And it's editable in the backup proccess, too. Bug #763 closed. --- backup/backup_check.html | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/backup/backup_check.html b/backup/backup_check.html index fdcce87c27..8ac978b118 100644 --- a/backup/backup_check.html +++ b/backup/backup_check.html @@ -83,8 +83,9 @@ echo get_string("name").":"; echo ""; //Calculate the backup string - //Take off spaces in the filename !! - $backup_name = str_replace(" ","_",strtolower(get_string("backupfilename"))); + //Take off some characters in the filename !! + $takeoff = array(" ", ":", "/", "\\", "|"); + $backup_name = str_replace($takeoff,"_",strtolower(get_string("backupfilename"))); //If non-translated, use "backup" if (substr($backup_name,0,1) == "[") { $backup_name = "backup"; @@ -95,10 +96,9 @@ if (substr($backup_name_format,0,1) == "[") { $backup_name_format = "%%Y%%m%%d-%%H%%M"; } - $backup_name .= str_replace(" ","_","-".strtolower($course->shortname)."-".userdate(time(),$backup_name_format,99,false).".zip"); - echo $backup_name; - //Add as hidden name - echo ""; + $backup_name .= str_replace($takeoff,"_","-".strtolower($course->shortname)."-".userdate(time(),$backup_name_format,99,false).".zip"); + //Add as text field + echo ""; echo ""; //Calculate the backup unique code to allow simultaneus backups (to define -- 2.39.5