]> git.mjollnir.org Git - moodle.git/commitdiff
Show error if the dbtype specified isn't supported by XMLDB
authorstronk7 <stronk7>
Mon, 9 Oct 2006 22:28:22 +0000 (22:28 +0000)
committerstronk7 <stronk7>
Mon, 9 Oct 2006 22:28:22 +0000 (22:28 +0000)
lib/ddllib.php

index 713559b42240d0a8611a73057ac05bf6afb13d0b..4c48f7e1a147453a06fd042a816020f4ccc9189e 100644 (file)
     require_once($CFG->libdir . '/xmldb/classes/XMLDBStatement.class.php');
 
 /// Based on $CFG->dbtype, add the proper generator class
+    if (!file_exists($CFG->libdir . '/xmldb/classes/generators/' . $CFG->dbtype . '/' . $CFG->dbtype . '.class.php')) {
+        error ('DB Type: ' . $CFG->dbtype . ' not supported by XMLDDB');
+    }
     require_once($CFG->libdir . '/xmldb/classes/generators/' . $CFG->dbtype . '/' . $CFG->dbtype . '.class.php');
 
+
 /// Add other libraries
     require_once($CFG->libdir . '/xmlize.php');
-
-
 /**
  * Add a new field to a table, or modify an existing one (if oldfield is defined).
  * Warning: Please be careful on primary keys, as this function will eat auto_increments