summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTed Trask <ttrask01@yahoo.com>2008-06-18 20:07:55 +0000
committerTed Trask <ttrask01@yahoo.com>2008-06-18 20:07:55 +0000
commitda61beb7aef90f48606ab904dbe2131b50b12912 (patch)
tree7f919786d519237f184eaacd7a22cd138aabc54c
parent08728e7fef784033ab7849324ab21217fe59627f (diff)
downloadacf-core-da61beb7aef90f48606ab904dbe2131b50b12912.tar.bz2
acf-core-da61beb7aef90f48606ab904dbe2131b50b12912.tar.xz
Rewrite of tinydns to simplify code and use new cfe model.
Added js to filter records. git-svn-id: svn://svn.alpinelinux.org/acf/core/trunk@1219 ab2d0c66-481e-0410-8bed-d214d4d58bed
-rwxr-xr-xlib/validator.lua8
-rw-r--r--lib/viewfunctions.lua2
2 files changed, 5 insertions, 5 deletions
diff --git a/lib/validator.lua b/lib/validator.lua
index 06c58fc..d57ca5f 100755
--- a/lib/validator.lua
+++ b/lib/validator.lua
@@ -71,7 +71,7 @@ end
--
function is_ipv4(ipv4)
local retval = false;
- local nums = { "", "", "", ""};
+ local nums = {};
local iplen = string.len(ipv4);
-- check the ipv4's length
@@ -82,11 +82,11 @@ function is_ipv4(ipv4)
-- NC: Split the string into an array. separate with '.' (dots)
-- ^ beginning of string
-- () capture
- -- \. litteral '.' The \ neutralizes the . character class.
+ -- %. litteral '.' The % neutralizes the . character class.
-- %d+ one or more digits
-- $ end of string
- nums = { ipv4:match ("^(%d+)\.(%d+)\.(%d+)\.(%d+)$" ) }
-
+ nums = {ipv4:match ("^(%d+)%.(%d+)%.(%d+)%.(%d+)$")}
+
-- check if all nums are filled
if ( nums[1] == nil or
nums[2] == nil or
diff --git a/lib/viewfunctions.lua b/lib/viewfunctions.lua
index 312ba3b..a8ad444 100644
--- a/lib/viewfunctions.lua
+++ b/lib/viewfunctions.lua
@@ -164,7 +164,7 @@ function displayform(myform, order)
displayformitem(item)
end
end
- io.write('<DT><input class="submit" type="submit" name="' .. myform.option .. '" value="' .. (myform.submit or myform.option) .. '"></DT>\n')
+ io.write('<DT></DT><DD><input class="submit" type="submit" name="' .. myform.option .. '" value="' .. (myform.submit or myform.option) .. '"></DD>\n')
io.write('</DL>\n')
io.write('</FORM>')
end