You are here

function hosting_platform_delete in Hosting 6.2

Same name and namespace in other branches
  1. 5 platform/hosting_platform.module \hosting_platform_delete()
  2. 7.4 platform/hosting_platform.module \hosting_platform_delete()
  3. 7.3 platform/hosting_platform.module \hosting_platform_delete()

Implementation of hook_delete().

File

platform/hosting_platform.module, line 430
Platform node type definition.

Code

function hosting_platform_delete($node) {
  db_query('DELETE FROM {hosting_platform} WHERE nid = %d', $node->nid);
  db_query('DELETE FROM {hosting_package_instance} WHERE rid=%d', $node->nid);
  hosting_context_delete($node->nid);
  $result = db_query("SELECT distinct nid FROM {hosting_task} WHERE rid=%d", $node->nid);
  while ($nid = db_fetch_object($result)) {
    node_delete($nid->nid);
  }
  $result = db_query("SELECT distinct nid FROM {hosting_site} WHERE platform=%d", $node->nid);
  while ($nid = db_fetch_object($result)) {
    node_delete($nid->nid);
  }
}