You are here

function hostingService_dns_master::insert in Hostmaster (Aegir) 6

Overrides hostingService::insert

File

modules/hosting/dns/hosting_dns.service.inc, line 66
Provide the hosting serivce classes for DNS integration.

Class

hostingService_dns_master
Helper class to factor together master functionality

Code

function insert() {
  parent::insert();
  if (is_array($this->slave_servers)) {
    foreach (array_filter($this->slave_servers) as $slave_server) {
      $record = array(
        'master_nid' => $this->server->nid,
        'master_vid' => $this->server->vid,
        'slave_nid' => $slave_server,
      );
      drupal_write_record('hosting_dns_slaves', $record);
    }
  }
}