Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Now backup names are cleaned completely, avoiding some problems

with translations and manually typed names with diacritics.
Thanks to Marian Zvalo!

Merged from MOODLE_14_STABLE
  • Loading branch information...
commit 99f363bf660fb42fd0fed54258881db0ae8ba3c3 1 parent d30981d
stronk7 authored
View
2  backup/backup_check.html
@@ -115,6 +115,8 @@
$backup_name .= userdate(time(),$backup_date_format,99,false);
//The extension
$backup_name .= ".zip";
+ //And finally, clean everything
+ $backup_name = clean_filename($backup_name);
//Add as text field
echo "<input type=\"text\" name=\"backup_name\" size=\"40\" value=\"".$backup_name."\">";
View
5 backup/backup_execute.html
@@ -88,7 +88,8 @@
if (!isset($backup_name)) {
error ("Backup name not specified");
}
- $preferences->backup_name = $backup_name;
+ //We clean it again (to prevent diacritics entered manually)
+ $preferences->backup_name = clean_filename($backup_name);
if (!isset($backup_unique_code)) {
error ("Backup unique code not specified");
@@ -113,7 +114,7 @@
echo "<td align=\"right\"><p><b>";
echo get_string("name").":";
echo "</b></td><td>";
- echo $backup_name;
+ echo $preferences->backup_name;
echo "</td></tr>";
//Start the main tr, where all the backup progress is done
View
4 backup/backup_scheduled.php
@@ -425,11 +425,15 @@ function schedule_backup_course_configure($course,$starttime = 0) {
$backup_name .= userdate(time(),$backup_date_format,99,false);
//The extension
$backup_name .= ".zip";
+ //And finally, clean everything
+ $backup_name = clean_filename($backup_name);
//Calculate the string to match the keep preference
$keep_name = $backup_word."-";
//The shortname
$keep_name .= strtolower($backup_shortname)."-";
+ //And finally, clean everything
+ $keep_name = clean_filename($keep_name);
$preferences->backup_name = $backup_name;
$preferences->keep_name = $keep_name;
Please sign in to comment.
Something went wrong with that request. Please try again.