function hosting_server_insert in Hostmaster (Aegir) 6
Implementation of hook_insert().
1 call to hosting_server_insert()
- hosting_server_update in modules/
hosting/ server/ hosting_server.module - Implementation of hook_update().
File
- modules/
hosting/ server/ hosting_server.module, line 341
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');
}
}