Skip to content

Commit

Permalink
Merge branch 'MDL-33886-33' of git://github.com/zig-moodle/moodle int…
Browse files Browse the repository at this point in the history
…o MOODLE_33_STABLE
  • Loading branch information
David Monllao committed Dec 27, 2017
2 parents 9308160 + 39dc526 commit 2530725
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions backup/util/ui/backup_moodleform.class.php
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -122,6 +122,8 @@ public function validation($data, $files) {
if (!array_key_exists('setting_root_filename', $errors)) { if (!array_key_exists('setting_root_filename', $errors)) {
if (trim($data['setting_root_filename']) == '') { if (trim($data['setting_root_filename']) == '') {
$errors['setting_root_filename'] = get_string('errorfilenamerequired', 'backup'); $errors['setting_root_filename'] = get_string('errorfilenamerequired', 'backup');
} else if (strlen(trim($data['setting_root_filename'])) > 255) {
$errors['setting_root_filename'] = get_string('errorfilenametoolong', 'backup');
} else if (!preg_match('#\.mbz$#i', $data['setting_root_filename'])) { } else if (!preg_match('#\.mbz$#i', $data['setting_root_filename'])) {
$errors['setting_root_filename'] = get_string('errorfilenamemustbezip', 'backup'); $errors['setting_root_filename'] = get_string('errorfilenamemustbezip', 'backup');
} }
Expand Down
1 change: 1 addition & 0 deletions lang/en/backup.php
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -140,6 +140,7 @@
$string['error_course_module_not_found'] = 'Orphan course module (id: {$a}) found. This module will not be backed up.'; $string['error_course_module_not_found'] = 'Orphan course module (id: {$a}) found. This module will not be backed up.';
$string['errorcopyingbackupfile'] = "Failed to copy the backup file to the temporary folder before restoring."; $string['errorcopyingbackupfile'] = "Failed to copy the backup file to the temporary folder before restoring.";
$string['errorfilenamerequired'] = 'You must enter a valid filename for this backup'; $string['errorfilenamerequired'] = 'You must enter a valid filename for this backup';
$string['errorfilenametoolong'] = 'The filename length you enter must be less than 255 characters';
$string['errorfilenamemustbezip'] = 'The filename you enter must be a ZIP file and have the .mbz extension'; $string['errorfilenamemustbezip'] = 'The filename you enter must be a ZIP file and have the .mbz extension';
$string['errorminbackup20version'] = 'This backup file has been created with one development version of Moodle backup ({$a->backup}). Minimum required is {$a->min}. Cannot be restored.'; $string['errorminbackup20version'] = 'This backup file has been created with one development version of Moodle backup ({$a->backup}). Minimum required is {$a->min}. Cannot be restored.';
$string['errorinvalidformat'] = 'Unknown backup format'; $string['errorinvalidformat'] = 'Unknown backup format';
Expand Down

0 comments on commit 2530725

Please sign in to comment.