function hosting_task_insert in Hostmaster (Aegir) 6
Implementation of hook_insert().
1 call to hosting_task_insert()
- hosting_task_update in modules/
hosting/ task/ hosting_task.module - Implementation of hook_update().
File
- modules/
hosting/ task/ hosting_task.module, line 570 - Web server node type is defined here.
Code
function hosting_task_insert($node) {
$node->executed = isset($node->executed) ? $node->executed : NULL;
$node->delta = isset($node->delta) ? $node->delta : NULL;
db_query("INSERT INTO {hosting_task} (vid, nid, task_type, task_status, rid, executed, delta) VALUES (%d, %d, '%s', %d, %d, %d, %d)", $node->vid, $node->nid, $node->task_type, $node->task_status, $node->rid, $node->executed, $node->delta);
if (isset($node->task_args) && is_array($node->task_args)) {
foreach ($node->task_args as $key => $value) {
db_query("INSERT INTO {hosting_task_arguments} (vid, nid, name, value) VALUES (%d, %d, '%s', '%s')", $node->vid, $node->nid, $key, $value);
}
}
hosting_task_set_title($node);
}