diff --git a/lib/dml/moodle_database.php b/lib/dml/moodle_database.php index d525a4b37a2..83885c3bcf1 100644 --- a/lib/dml/moodle_database.php +++ b/lib/dml/moodle_database.php @@ -160,9 +160,10 @@ abstract class moodle_database { * Loads and returns a database instance with the specified type and library. * @param string $type database type of the driver (mysqli, pgsql, mssql, sqldrv, oci, etc.) * @param string $library database library of the driver (native, pdo, etc.) + * @param boolean $external true if this is an external database * @return moodle_database driver object or null if error */ - public static function get_driver_instance($type, $library) { + public static function get_driver_instance($type, $library, $external = false) { global $CFG; $classname = $type.'_'.$library.'_moodle_database'; @@ -173,7 +174,7 @@ abstract class moodle_database { } require_once($libfile); - return new $classname(); + return new $classname($external); } /**