diff options
-rw-r--r-- | packages/tinydns/tinydns.inc | 12 | ||||
-rw-r--r-- | packages/tinydns/tinydns_domains.xml | 6 |
2 files changed, 13 insertions, 5 deletions
diff --git a/packages/tinydns/tinydns.inc b/packages/tinydns/tinydns.inc index 9622d8e9..67e49abb 100644 --- a/packages/tinydns/tinydns.inc +++ b/packages/tinydns/tinydns.inc @@ -191,6 +191,10 @@ function tinydns_create_zone_file() { $hostname = $domain['hostname']; $ipaddress = $domain['ipaddress']; $ttl = $domain['ttl']; + if($ttl) + $ttl_string = "::{$ttl}"; + else + $ttl_string = ""; /* check record status, if it is down request * backup server if defined. */ @@ -202,16 +206,16 @@ function tinydns_create_zone_file() { $record_data = ".{$hostname}::{$ipaddress}"; break; case "MX": - $record_data = "@{$hostname}:{$ipaddress}::{$ttl}"; + $record_data = "@{$hostname}:{$ipaddress}{$ttl_string}"; break; case "A": - $record_data = "+{$hostname}:{$ipaddress}::{$ttl}"; + $record_data = "+{$hostname}:{$ipaddress}{$ttl_string}"; break; case "PTR": - $record_data = "={$hostname}:{$ipaddress}::{$ttl}"; + $record_data = "={$hostname}:{$ipaddress}{$ttl_string}"; break; case "CNAME": - $record_data = "C{$hostname}:{$ipaddress}::{$ttl}"; + $record_data = "C{$hostname}:{$ipaddress}{$ttl_string}"; break; } if($record_data) diff --git a/packages/tinydns/tinydns_domains.xml b/packages/tinydns/tinydns_domains.xml index 7f632eb9..94a124c5 100644 --- a/packages/tinydns/tinydns_domains.xml +++ b/packages/tinydns/tinydns_domains.xml @@ -31,6 +31,7 @@ <description>Enter the domain name that you would like to serve dns records for.</description> <required/> <type>input</type> + <size>45</size> </field> <field> <fielddescr>Record type</fielddescr> @@ -54,16 +55,19 @@ <description>Enter the IP Address that this record will point to (primary). The only exception is for NS type records where we expect a complete hostname to point to a A record.</description> <required/> <type>input</type> + <size>45</size> </field> <field> <fieldname>ttl</fieldname> <fielddescr>DNS record time to live</fielddescr> <type>input</type> + <size>45</size> </field> <field> <fieldname>threshhold</fieldname> <fielddescr>Time in minutes before DNS switches to backup host</fielddescr> <type>input</type> + <size>45</size> </field> <field> <type>rowhelper</type> @@ -73,7 +77,7 @@ <fieldname>failoverip</fieldname> <description>Failover IP when host is not responding to ICMP/PING traffic</description> <type>input</type> - <size>25</size> + <size>45</size> </rowhelperfield> </rowhelper> </field> |