function hosting_site_insert in Hosting 5
Same name and namespace in other branches
- 6.2 site/hosting_site.nodeapi.inc \hosting_site_insert()
- 7.4 site/hosting_site.nodeapi.inc \hosting_site_insert()
- 7.3 site/hosting_site.nodeapi.inc \hosting_site_insert()
1 call to hosting_site_insert()
File
- site/
hosting_site.module, line 381
Code
function hosting_site_insert(&$node) {
$client = hosting_get_client($node->client);
$node->client = $client->nid;
$node->language = $node->language ? $node->language : 'en';
db_query("INSERT INTO {hosting_site} (vid, nid, client, db_server, platform, profile, language, last_cron, status, verified) VALUES (%d, %d, %d, %d, %d, %d, '%s', %d, %d, %d)", $node->vid, $node->nid, $node->client, $node->db_server, $node->platform, $node->profile, $node->language, $node->last_cron, $node->site_status, $node->verified);
if (!$node->old_vid) {
if ($node->import) {
hosting_add_task($node->nid, 'import');
}
else {
hosting_add_task($node->nid, 'install');
}
}
}