Commit 793c77a0 authored by Till Brehm's avatar Till Brehm

Split DNS TXT records in chunks of 255 chars in BIND configuration file.

parent e960e1d3
......@@ -106,6 +106,10 @@ class bind_plugin {
if(is_array($records) && !empty($records)){
for($i=0;$i<sizeof($records);$i++){
if($records[$i]['ttl'] == 0) $records[$i]['ttl'] = '';
//* 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);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment