]> git.mjollnir.org Git - moodle.git/commitdiff
Improve error output of install_from_xmldb_file(). Part of MDL-7262
authorstronk7 <stronk7>
Sat, 28 Oct 2006 10:37:54 +0000 (10:37 +0000)
committerstronk7 <stronk7>
Sat, 28 Oct 2006 10:37:54 +0000 (10:37 +0000)
Merged from MOODLE_17_STABLE

lib/ddllib.php

index 5166994653087547f9f02c88acc890a2586e8d4a..2648f87b91a9700d2a0b8dea6accdff98febb8d7 100644 (file)
@@ -530,6 +530,12 @@ function install_from_xmldb_file($file) {
 
     $loaded = $xmldb_file->loadXMLStructure();
     if (!$loaded || !$xmldb_file->isLoaded()) {
+    /// Show info about the error if we can find it
+        if ($structure =& $xmldb_file->getStructure()) {
+            if ($errors = $structure->getAllErrors()) {
+                notify('Errors found in XMLDB file: '. implode (', ', $errors));
+            }
+        }
         return false;
     }