function _hosting_migrate_get_target_profile_name in Hosting 7.4
Same name and namespace in other branches
- 6.2 migrate/hosting_migrate.drush.inc \_hosting_migrate_get_target_profile_name()
- 7.3 migrate/hosting_migrate.drush.inc \_hosting_migrate_get_target_profile_name()
2 calls to _hosting_migrate_get_target_profile_name()
- drush_hosting_clone_pre_hosting_task in clone/
hosting_clone.drush.inc - @file Drush include for the site cloning module.
- drush_hosting_migrate_pre_hosting_task in migrate/
hosting_migrate.drush.inc - @file Implement drush hooks for the hosting migrate module.
File
- migrate/
hosting_migrate.drush.inc, line 34 - Implement drush hooks for the hosting migrate module.
Code
function _hosting_migrate_get_target_profile_name($task) {
// load the original install profile
$profile = node_load($task->ref->profile);
// get the profile instance we are migrating to.
$profile_instance = hosting_package_instance_load(array(
'i.rid' => $task->task_args['target_platform'],
'p.short_name' => $profile->short_name,
));
if (empty($profile_instance)) {
// get a possible upgrade path for the profile.
$profile_instance = hosting_package_instance_load(array(
'i.rid' => $task->task_args['target_platform'],
'p.old_short_name' => $profile->short_name,
));
}
return $profile_instance;
}