Index: adodb_moodle_database.php =================================================================== RCS file: /cvsroot/moodle/moodle/lib/dml/adodb_moodle_database.php,v retrieving revision 1.14 diff -u -r1.14 adodb_moodle_database.php --- adodb_moodle_database.php 16 Jun 2008 21:01:54 -0000 1.14 +++ adodb_moodle_database.php 19 Jun 2008 22:16:48 -0000 @@ -29,7 +29,7 @@ public function export_dbconfig() { $cfg = new stdClass(); $cfg->dbtype = $this->get_dbtype(); - $cfg->library = 'adodb'; + $cfg->dblibrary = 'adodb'; $cfg->dbhost = $this->dbhost; $cfg->dbname = $this->dbname; $cfg->dbuser = $this->dbuser; @@ -45,13 +45,7 @@ protected abstract function preconfigure_dbconnection(); public function connect($dbhost, $dbuser, $dbpass, $dbname, $dbpersist, $prefix, array $dboptions=null) { - $this->dbhost = $dbhost; - $this->dbuser = $dbuser; - $this->dbpass = $dbpass; - $this->dbname = $dbname; - $this->dbpersist = $dbpersist; - $this->prefix = $prefix; - $this->dboptions = (array)$dboptions; + parent::connect($dbhost, $dbuser, $dbpass, $dbname, $dbpersist, $prefix, $dboptions); global $CFG; Index: moodle_database.php =================================================================== RCS file: /cvsroot/moodle/moodle/lib/dml/moodle_database.php,v retrieving revision 1.33 diff -u -r1.33 moodle_database.php --- moodle_database.php 20 Jun 2008 09:40:03 -0000 1.33 +++ moodle_database.php 20 Jun 2008 16:26:38 -0000 @@ -132,7 +132,16 @@ * @param array $dboptions driver specific options * @return bool success */ - public abstract function connect($dbhost, $dbuser, $dbpass, $dbname, $dbpersist, $prefix, array $dboptions=null); + public function connect($dbhost, $dbuser, $dbpass, $dbname, $dbpersist, $prefix, array $dboptions=null) { + $this->dbhost = $dbhost; + $this->dbuser = $dbuser; + $this->dbpass = $dbpass; + $this->dbname = $dbname; + $this->dbpersist = $dbpersist; + $this->prefix = $prefix; + $this->dboptions = (array)$dboptions; + return true; + } /** * Attempt to create the database @@ -1093,7 +1102,7 @@ */ public function delete_records($table, array $conditions=null) { if (is_null($conditions)) { - return $this->execute("TRUNCATE TABLE {".$table."}"); + return $this->execute("DELETE FROM {$table}"); } list($select, $params) = $this->where_clause($conditions); return $this->delete_records_select($table, $select, $params);