]> git.mjollnir.org Git - moodle.git/commitdiff
Changed to avoid backup_name contains whitespaces !!
authorstronk7 <stronk7>
Mon, 23 Jun 2003 17:50:38 +0000 (17:50 +0000)
committerstronk7 <stronk7>
Mon, 23 Jun 2003 17:50:38 +0000 (17:50 +0000)
backup/backup_check.html

index b38326475b68a8238eae08edf2df0f1f137ee6c8..ac960584d15634d50f9f5ef650e0ad64d60e3398 100644 (file)
         $backup_name = "backup";
     }
     //Calculate the format string
-    $backup_name_format = get_string("backupnameformat");
+    $backup_name_format = str_replace(" ","_",get_string("backupnameformat"));
     //If non-translated, use "%Y%m%d-%H%M"
     if (substr($backup_name_format,0,1) == "[") {
         $backup_name_format = "%%Y%%m%%d-%%H%%M";
     }
-    $backup_name .= "-".strtolower($course->shortname)."-".userdate(time(),$backup_name_format,99,false).".zip";
+    $backup_name .= str_replace(" ","_","-".strtolower($course->shortname)."-".userdate(time(),$backup_name_format,99,false).".zip");
     echo $backup_name;
     //Add as hidden name
     echo "<input type=\"hidden\" name=\"backup_name\" value=\"".$backup_name."\">";