function _backup_migrate_db_get_db_type in Backup and Migrate 8.2
Get the appropriate db type for file inclusion and calling the right function.
3 calls to _backup_migrate_db_get_db_type()
- backup_migrate_db_backup in includes/
db.inc - Build the database dump file. Takes a list of tables to exclude and some formatting options.
- backup_migrate_db_restore in includes/
db.inc - Restore from a previously backed up files. File must be a decompressed SQL file.
- _backup_migrate_get_table_names in includes/
db.inc - Get the list of table names.
File
- includes/
db.inc, line 159 - General database dump/restore code for Backup and Migrate.
Code
function _backup_migrate_db_get_db_type($scheme) {
static $type = NULL;
if ($type === NULL) {
switch ($scheme) {
case 'mysql':
case 'mysqli':
$type = 'mysql';
backup_migrate_include('db.mysql');
break;
default:
$type = false;
break;
}
if (!$type) {
if ($scheme) {
_backup_migrate_message("Backup and migrate does not support @type databases.", array(
"@type" => $scheme,
), 'error');
}
else {
_backup_migrate_message("Backup and migrate does not support this database type.", array(), 'error');
}
}
}
return $type;
}