function migrate_webform_get_source_connection in Migrate Webform 7
Decide whether we have an external database and return the correct connection.
If the migration source database exists, we will get a connection to it instead of using the $databases['default'].
8 calls to migrate_webform_get_source_connection()
File
- ./
migrate_webform.module, line 143 - Migrate does not use this file. So global helper functions could go here.
Code
function migrate_webform_get_source_connection() {
$migration_source_db = variable_get('migrate_webform_source_database', 'default');
if (empty($GLOBALS['databases'][$migration_source_db]['default'])) {
$migration_source_db = NULL;
}
$connection = Database::getConnection('default', $migration_source_db);
return $connection;
}