Diference between moodle.xml file not found and moodle.xml file

incorrect at restore time. Bug 5334.
(http://moodle.org/bugs/bug.php?op=show&bugid=5334)
This commit is contained in:
stronk7 2006-04-25 22:55:29 +00:00
parent b76169a214
commit 9fe25ab4f1

View File

@ -4659,10 +4659,14 @@
echo "<li>".get_string("checkingbackup").'</li>';
}
if (! $status = restore_check_moodle_file ($xml_file)) {
if (!defined('RESTORE_SILENTLY')) {
notify("Error checking backup file. Invalid or corrupted.");
if (!is_file($xml_file)) {
$errorstr = 'Error checking backup file. moodle.xml not found at root level of zip file.';
} else {
$errorstr = 'Error checking backup file. moodle.xml is incorrect or corrupted.';
}
if (!defined('RESTORE_SILENTLY')) {
notify($errorstr);
} else {
$errorstr = "Error checking backup file. Invalid or corrupted.";
return false;
}
}