From d2dab8685a8aef5a773ab088f4a5c926c673e0df Mon Sep 17 00:00:00 2001 From: Ted Trask Date: Thu, 19 Jun 2008 21:01:51 +0000 Subject: Modified dns edit page to use javascript git-svn-id: svn://svn.alpinelinux.org/acf/tinydns/trunk@1220 ab2d0c66-481e-0410-8bed-d214d4d58bed --- tinydns-model.lua | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'tinydns-model.lua') diff --git a/tinydns-model.lua b/tinydns-model.lua index fa0632f..e75f937 100644 --- a/tinydns-model.lua +++ b/tinydns-model.lua @@ -18,13 +18,13 @@ local configdir = "/etc/"..processname local descr = { prefix={ ['.']="Name server for your domain (NS + A + SOA)", - ['&']="Deletegate subdomain (NS + A)", + ['&']="Delegate subdomain (NS + A)", ['=']="Host (A + PTR)", ['+']="Alias (A, no PTR)", ['@']="Mail exchanger (MX)", ["'"]="Text record (TXT)", ['^']="Reverse record (PTR)", - ['C']="Canonical Name (CNAME)", + ['C']="Canonical name (CNAME)", ['Z']="SOA record (SOA)", [':']="Generic record", ['%']="Client location", @@ -309,7 +309,8 @@ function updatefilecontent (path, modifications) if not (fs.is_file(path)) then errtxt = "Not a filename" elseif (validfilename(path)) then - fs.write_file(path, format.dostounix(modifications)) + modifications = string.gsub(format.dostounix(modifications), "\n*$", "") + fs.write_file(path, modifications) success = true else errtxt = "Not a valid filename!" -- cgit v1.2.3