diff --git a/classes/dataport_external.php b/classes/dataport_external.php index d13b373..6475be6 100644 --- a/classes/dataport_external.php +++ b/classes/dataport_external.php @@ -214,6 +214,9 @@ private function init_external_db($host, $dbname, $dbtype, $username, $password, require_once($CFG->libdir.'/adodb/adodb.inc.php'); // Connect to the external database (forcing new connection). + if ($dbtype === 'mariadb') { + $dbtype = 'mysqli' ; + } $extdb = ADONewConnection($dbtype); if ($debug) { $extdb->debug = true; diff --git a/tests/dbuserrel_test.php b/tests/dbuserrel_test.php index 5c4383f..e4d9409 100644 --- a/tests/dbuserrel_test.php +++ b/tests/dbuserrel_test.php @@ -111,7 +111,7 @@ public function test_readrelationships() { $this->dbuserrelplugin->set_config('remotesubjectuserfield', 'remote_subject_id'); $this->dbuserrelplugin->set_config('remoteobjectuserfield', 'remote_object_id'); $this->dbuserrelplugin->set_config('remoterolefield', 'remote_role'); - $this->dbuserrelplugin->set_config('debugdb', true); + $this->dbuserrelplugin->set_config('debugdb', false); $this->dbuserrelplugin->set_config('localsubjectuserfield', 'user_idnumber'); $this->dbuserrelplugin->set_config('localobjectuserfield', 'user_idnumber');