| | |
| | | if(is_array($records) && !empty($records)){ |
| | | for($i=0;$i<sizeof($records);$i++){ |
| | | if($records[$i]['ttl'] == 0) $records[$i]['ttl'] = ''; |
| | | if($records[$i]['name'] == '') $records[$i]['name'] = '@'; |
| | | //* Split TXT records, if nescessary |
| | | if($records[$i]['type'] == 'TXT' && strlen($records[$i]['data']) > 255) { |
| | | $records[$i]['data'] = implode('" "',str_split( $records[$i]['data'], 255)); |
| | | } |
| | | } |
| | | } |
| | | $tpl->setLoop('zones', $records); |
| | |
| | | if(is_file($filename.'.err')) unlink($filename.'.err'); |
| | | } |
| | | |
| | | //* Reload bind nameserver |
| | | $app->services->restartServiceDelayed('bind', 'reload'); |
| | | //* Restart bind nameserver if update_acl is not empty, otherwise reload it |
| | | if($data['new']['update_acl'] != '') { |
| | | $app->services->restartServiceDelayed('bind', 'restart'); |
| | | } else { |
| | | $app->services->restartServiceDelayed('bind', 'reload'); |
| | | } |
| | | |
| | | } |
| | | |