diff options
author | Steven Barth <steven@midlink.org> | 2008-03-27 23:14:01 +0000 |
---|---|---|
committer | Steven Barth <steven@midlink.org> | 2008-03-27 23:14:01 +0000 |
commit | 077db659bbcb7cee6bbc4c4dbaed9776261190a0 (patch) | |
tree | 0128ec76baf8112f2dd6538e0c5a9448cdf7d91a /src/ffluci/util.lua | |
parent | 3f1064b91949741af53eb1d198e228f768abaea8 (diff) |
* Major CBI improvements
Diffstat (limited to 'src/ffluci/util.lua')
-rw-r--r-- | src/ffluci/util.lua | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/src/ffluci/util.lua b/src/ffluci/util.lua index f2180e7c00..85092f065c 100644 --- a/src/ffluci/util.lua +++ b/src/ffluci/util.lua @@ -203,7 +203,7 @@ end -- Validates a variable -function validate(value, valid, cast_number, cast_int) +function validate(value, cast_number, cast_int) if cast_number or cast_int then value = tonumber(value) end @@ -212,15 +212,6 @@ function validate(value, valid, cast_number, cast_int) value = nil end - - if type(valid) == "function" then - value = valid(value) - elseif type(valid) == "table" then - if not contains(valid, value) then - value = nil - end - end - return value end |