From 1c460b0bc99d2f33321e77ecc68dc584bcdeb24a Mon Sep 17 00:00:00 2001 From: stronk7 Date: Mon, 9 Oct 2006 22:28:22 +0000 Subject: [PATCH] Show error if the dbtype specified isn't supported by XMLDB --- lib/ddllib.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/ddllib.php b/lib/ddllib.php index 713559b422..4c48f7e1a1 100644 --- a/lib/ddllib.php +++ b/lib/ddllib.php @@ -55,12 +55,14 @@ 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 -- 2.39.5