function hosting_platform_post_hosting_delete_task in Hosting 7.3
Same name and namespace in other branches
- 6.2 platform/hosting_platform.drush.inc \hosting_platform_post_hosting_delete_task()
- 7.4 platform/hosting_platform.drush.inc \hosting_platform_post_hosting_delete_task()
Implements hook_hosting_post_DELETE().
File
- platform/
hosting_platform.drush.inc, line 121 - Implement drush hooks for the Platforms module.
Code
function hosting_platform_post_hosting_delete_task($task, $data) {
$task->ref->platform_status = HOSTING_PLATFORM_DELETED;
$task->ref->no_verify = TRUE;
node_save($task->ref);
hosting_context_delete($task->ref->nid);
db_delete('hosting_platform_client_access')
->condition('pid', $task->ref->nid)
->execute();
// Clean up package instances.
hosting_package_instance_sync($task->ref->nid, 'platform');
}