function hosting_platform_delete in Hosting 7.3
Same name and namespace in other branches
- 5 platform/hosting_platform.module \hosting_platform_delete()
- 6.2 platform/hosting_platform.module \hosting_platform_delete()
- 7.4 platform/hosting_platform.module \hosting_platform_delete()
Implements hook_delete().
File
- platform/
hosting_platform.module, line 591 - Platform node type definition.
Code
function hosting_platform_delete($node) {
db_delete('hosting_platform')
->condition('nid', $node->nid)
->execute();
db_delete('hosting_package_instance')
->condition('rid', $node->nid)
->execute();
hosting_context_delete($node->nid);
hosting_task_delete_related_tasks($node->nid);
$result = db_query("SELECT distinct nid FROM {hosting_site} WHERE platform = :platform", array(
':platform' => $node->nid,
));
while ($nid = $result
->fetch()) {
node_delete($nid->nid);
}
}