MDL-28193 Add $external arg to get_driver_instance

Signed-off-by: Andrew Robert Nicols <[email protected]>
This commit is contained in:
Andrew Robert Nicols
2011-07-06 01:40:35 +02:00
committed by Eloy Lafuente (stronk7)
parent 98e86d8b27
commit 757ca142ca
+3 -2
View File
@@ -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);
}
/**