You are here

function hosting_site_delete in Hosting 6.2

Same name and namespace in other branches
  1. 5 site/hosting_site.module \hosting_site_delete()
  2. 7.4 site/hosting_site.nodeapi.inc \hosting_site_delete()
  3. 7.3 site/hosting_site.nodeapi.inc \hosting_site_delete()

Implementation of hook_delete().

File

site/hosting_site.nodeapi.inc, line 125
Site nodeapi implementations.

Code

function hosting_site_delete($node) {
  db_query('DELETE FROM {hosting_site} 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);
  }
}