| | |
| | | $tpl->setVar($zone); |
| | | |
| | | $records = $app->db->queryAllRecords("SELECT * FROM dns_rr WHERE zone = ".$zone['id']." AND active = 'Y'"); |
| | | if(is_array($records) && !empty($records)){ |
| | | for($i=0;$i<sizeof($records);$i++){ |
| | | if($records[$i]['ttl'] == 0) $records[$i]['ttl'] = ''; |
| | | } |
| | | } |
| | | $tpl->setLoop('zones',$records); |
| | | |
| | | //TODO : change this when distribution information has been integrated into server record |
| | |
| | | if($data['old']['origin'] != $data['new']['origin']) { |
| | | //TODO : change this when distribution information has been integrated into server record |
| | | if (file_exists('/etc/gentoo-release')) { |
| | | $filename = $dns_config['bind_zonefiles_dir'].'/pri.'.str_replace("/", "_", substr($zone['origin'],0,-1)); |
| | | $filename = $dns_config['bind_zonefiles_dir'].'/pri.'.str_replace("/", "_", substr($data['old']['origin'],0,-1)); |
| | | } |
| | | else { |
| | | $filename = $dns_config['bind_zonefiles_dir'].'/pri.'.str_replace("/", "_", substr($zone['origin'],0,-1)); |
| | | $filename = $dns_config['bind_zonefiles_dir'].'/pri.'.str_replace("/", "_", substr($data['old']['origin'],0,-1)); |
| | | } |
| | | |
| | | if(is_file($filename)) unlink($filename); |