From: stronk7 Date: Tue, 25 Apr 2006 22:55:29 +0000 (+0000) Subject: Diference between moodle.xml file not found and moodle.xml file X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=9fe25ab4f100d6343785c7696c8e7e519f54888b;p=moodle.git 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) --- diff --git a/backup/restorelib.php b/backup/restorelib.php index 1121f34ce3..6fb42a6a06 100644 --- a/backup/restorelib.php +++ b/backup/restorelib.php @@ -4659,10 +4659,14 @@ echo "
  • ".get_string("checkingbackup").'
  • '; } if (! $status = restore_check_moodle_file ($xml_file)) { + 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("Error checking backup file. Invalid or corrupted."); + notify($errorstr); } else { - $errorstr = "Error checking backup file. Invalid or corrupted."; return false; } }