]> git.mjollnir.org Git - moodle.git/commitdiff
Diference between moodle.xml file not found and moodle.xml file
authorstronk7 <stronk7>
Tue, 25 Apr 2006 22:55:29 +0000 (22:55 +0000)
committerstronk7 <stronk7>
Tue, 25 Apr 2006 22:55:29 +0000 (22:55 +0000)
incorrect at restore time. Bug 5334.
(http://moodle.org/bugs/bug.php?op=show&bugid=5334)

backup/restorelib.php

index 1121f34ce39cba212a786d40aee77039adef1aec..6fb42a6a068b8f1e82818d2be340700a2aacf518 100644 (file)
                 echo "<li>".get_string("checkingbackup").'</li>';
             }
             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;
                 }
             }