You are here

function hostingService_http_pack::insert in Hosting 7.3

Same name and namespace in other branches
  1. 6.2 web_pack/hosting_web_pack.service.inc \hostingService_http_pack::insert()
  2. 7.4 web_pack/hosting_web_pack.service.inc \hostingService_http_pack::insert()

Overrides hostingService::insert

File

web_pack/hosting_web_pack.service.inc, line 72

Class

hostingService_http_pack

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);
  }
}