Permalink
Browse files

Merge branch 'MDL-33886-master' of git://github.com/zig-moodle/moodle

  • Loading branch information...
dmonllao committed Dec 26, 2017
2 parents 1b374b4 + 85ba952 commit c1d685b500b24439a21f794edf8c67df560023d8
Showing with 3 additions and 0 deletions.
  1. +2 −0 backup/util/ui/backup_moodleform.class.php
  2. +1 −0 lang/en/backup.php
@@ -122,6 +122,8 @@ public function validation($data, $files) {
if (!array_key_exists('setting_root_filename', $errors)) {
if (trim($data['setting_root_filename']) == '') {
$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'])) {
$errors['setting_root_filename'] = get_string('errorfilenamemustbezip', 'backup');
}
@@ -140,6 +140,7 @@
$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['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['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';

0 comments on commit c1d685b

Please sign in to comment.