function domain_source_node_insert in Domain Access 7.3
Same name and namespace in other branches
- 7.2 domain_source/domain_source.module \domain_source_node_insert()
Implements hook_node_insert()
1 call to domain_source_node_insert()
- domain_source_node_update in domain_source/
domain_source.module - Implements hook_node_update()
File
- domain_source/
domain_source.module, line 208 - Creates a source domain for linking to content from other domains.
Code
function domain_source_node_insert($node) {
// If not set, we ignore.
if (!isset($node->domain_source) || is_null($node->domain_source)) {
return;
}
domain_source_node_delete($node);
db_insert('domain_source')
->fields(array(
'nid' => $node->nid,
'domain_id' => $node->domain_source,
))
->execute();
}