function hosting_server_insert in Hosting 6.2
Same name and namespace in other branches
- 7.4 server/hosting_server.module \hosting_server_insert()
- 7.3 server/hosting_server.module \hosting_server_insert()
Implementation of hook_insert().
1 call to hosting_server_insert()
- hosting_server_update in server/
hosting_server.module - Implementation of hook_update().
File
- server/
hosting_server.module, line 379
Code
function hosting_server_insert($node) {
if (!$node->revision) {
$hosting_name = $node->hosting_name ? $node->hosting_name : 'server_' . preg_replace("/[!\\W\\.\\-]/", "", $node->title);
hosting_context_register($node->nid, $hosting_name);
}
db_query("INSERT INTO {hosting_server} (vid, nid) \n VALUES (%d, %d)", $node->vid, $node->nid);
hosting_ip_save($node, FALSE);
hosting_server_invoke_services($node, 'save', $node);
hosting_server_invoke_services($node, 'insert', $node);
if (!$node->no_verify) {
hosting_add_task($node->nid, 'verify');
}
}