From 9fe25ab4f100d6343785c7696c8e7e519f54888b Mon Sep 17 00:00:00 2001 From: stronk7 Date: Tue, 25 Apr 2006 22:55:29 +0000 Subject: [PATCH] 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) --- backup/restorelib.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) 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; } } -- 2.39.5