function hostingService_http_pack::insert in Hosting 6.2
Same name and namespace in other branches
- 7.4 web_pack/hosting_web_pack.service.inc \hostingService_http_pack::insert()
- 7.3 web_pack/hosting_web_pack.service.inc \hostingService_http_pack::insert()
Overrides hostingService::insert
File
- web_pack/
hosting_web_pack.service.inc, line 65
Class
Code
function insert() {
parent::insert();
foreach (array_filter($this->master_servers) as $web_server) {
$record = array(
'nid' => $this->server->nid,
'vid' => $this->server->vid,
'web_server_nid' => $web_server,
'type' => 'master',
);
drupal_write_record('hosting_web_pack', $record);
}
foreach (array_filter($this->slave_servers) as $web_server) {
$record = array(
'nid' => $this->server->nid,
'vid' => $this->server->vid,
'web_server_nid' => $web_server,
'type' => 'slave',
);
drupal_write_record('hosting_web_pack', $record);
}
}