diff options
Diffstat (limited to 'libs')
-rw-r--r-- | libs/cbi/luasrc/cbi.lua | 7 | ||||
-rw-r--r-- | libs/core/luasrc/util.lua | 14 | ||||
-rw-r--r-- | libs/sgi-webuci/luasrc/sgi/webuci.lua | 4 | ||||
-rw-r--r-- | libs/web/luasrc/dispatcher.lua | 3 |
4 files changed, 4 insertions, 24 deletions
diff --git a/libs/cbi/luasrc/cbi.lua b/libs/cbi/luasrc/cbi.lua index d6a5cca056..fbd235595f 100644 --- a/libs/cbi/luasrc/cbi.lua +++ b/libs/cbi/luasrc/cbi.lua @@ -579,9 +579,6 @@ end --[[ Value - A one-line value maxlength: The maximum length - isnumber: The value must be a valid (floating point) number - isinteger: The value must be a valid integer - ispositive: The value must be positive (and a number) ]]-- Value = class(AbstractValue) @@ -590,8 +587,6 @@ function Value.__init__(self, ...) self.template = "cbi/value" self.maxlength = nil - self.isnumber = false - self.isinteger = false end -- This validation is a bit more complex @@ -600,7 +595,7 @@ function Value.validate(self, val) val = nil end - return luci.util.validate(val, self.isnumber, self.isinteger) + return val end diff --git a/libs/core/luasrc/util.lua b/libs/core/luasrc/util.lua index 343c627259..11f77206bc 100644 --- a/libs/core/luasrc/util.lua +++ b/libs/core/luasrc/util.lua @@ -276,20 +276,6 @@ function updfenv(f, extscope) end --- Validates a variable -function validate(value, cast_number, cast_int) - if cast_number or cast_int then - value = tonumber(value) - end - - if cast_int and value and not(value % 1 == 0) then - value = nil - end - - return value -end - - -- Parse units from a string and return integer value function parse_units(ustr) diff --git a/libs/sgi-webuci/luasrc/sgi/webuci.lua b/libs/sgi-webuci/luasrc/sgi/webuci.lua index 1ad067c6ba..a40888e7e8 100644 --- a/libs/sgi-webuci/luasrc/sgi/webuci.lua +++ b/libs/sgi-webuci/luasrc/sgi/webuci.lua @@ -1,8 +1,8 @@ --[[ -LuCI - SGI-Module for Haserl +LuCI - SGI-Module for Webuci Description: -Server Gateway Interface for Haserl +Server Gateway Interface for Webuci FileId: $Id: webuci.lua 2027 2008-05-07 21:16:35Z Cyrus $ diff --git a/libs/web/luasrc/dispatcher.lua b/libs/web/luasrc/dispatcher.lua index ff4170cb8a..64355439b2 100644 --- a/libs/web/luasrc/dispatcher.lua +++ b/libs/web/luasrc/dispatcher.lua @@ -158,10 +158,9 @@ function dispatch() local tpl = require("luci.template") tpl.viewns.translate = function(...) return require("luci.i18n").translate(...) end tpl.viewns.controller = luci.http.dispatcher() - tpl.viewns.uploadctrl = luci.http.dispatcher_upload() + tpl.viewns.uploadctrl = luci.http.dispatcher_upload() -- DEPRECATED tpl.viewns.media = luci.config.main.mediaurlbase tpl.viewns.resource = luci.config.main.resourcebase - tpl.viewns.uci = require("luci.model.uci").config tpl.viewns.REQUEST_URI = luci.http.env.SCRIPT_NAME .. (luci.http.env.PATH_INFO or "") |