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-05 12:22:41 +01:00
parent 81f8e0f8a0
commit b7eceef75f
+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);
}
/**