You are here

function hosting_site_node_insert in Hosting 7.3

Same name and namespace in other branches
  1. 7.4 site/hosting_site.nodeapi.inc \hosting_site_node_insert()

Implements hook_node_insert().

File

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

Code

function hosting_site_node_insert($node) {
  if ($node->type == "site") {
    if (empty($node->old_vid)) {
      hosting_context_register($node->nid, isset($node->hosting_name) ? $node->hosting_name : $node->title);
      if (isset($node->import)) {
        hosting_add_task($node->nid, 'import');
      }
      else {
        hosting_add_task($node->nid, 'install');
      }
    }
  }
}