diff options
Diffstat (limited to 'modules/luci-base/luasrc')
-rw-r--r-- | modules/luci-base/luasrc/ccache.lua | 2 | ||||
-rw-r--r-- | modules/luci-base/luasrc/sgi/cgi.lua | 4 | ||||
-rw-r--r-- | modules/luci-base/luasrc/template.lua | 6 |
3 files changed, 6 insertions, 6 deletions
diff --git a/modules/luci-base/luasrc/ccache.lua b/modules/luci-base/luasrc/ccache.lua index bcc76e6a7b..d3be7cba6c 100644 --- a/modules/luci-base/luasrc/ccache.lua +++ b/modules/luci-base/luasrc/ccache.lua @@ -61,7 +61,7 @@ function cache_enable(cachepath, mode) package.loaders[2] = function(mod) local encoded = cachepath .. "/" .. _encode_filename(mod) local modcons = _load_sane(encoded) - + if modcons then return modcons end diff --git a/modules/luci-base/luasrc/sgi/cgi.lua b/modules/luci-base/luasrc/sgi/cgi.lua index 68ae17a9eb..400db4710d 100644 --- a/modules/luci-base/luasrc/sgi/cgi.lua +++ b/modules/luci-base/luasrc/sgi/cgi.lua @@ -35,11 +35,11 @@ function run() limitsource(io.stdin, tonumber(luci.sys.getenv("CONTENT_LENGTH"))), ltn12.sink.file(io.stderr) ) - + local x = coroutine.create(luci.dispatcher.httpdispatch) local hcache = "" local active = true - + while coroutine.status(x) ~= "dead" do local res, id, data1, data2 = coroutine.resume(x, r) diff --git a/modules/luci-base/luasrc/template.lua b/modules/luci-base/luasrc/template.lua index cd9b73b22b..3955bd76f3 100644 --- a/modules/luci-base/luasrc/template.lua +++ b/modules/luci-base/luasrc/template.lua @@ -53,7 +53,7 @@ function Template.__init__(self, name, template) -- Create a new namespace for this template self.viewns = context.viewns - + -- If we have a cached template, skip compiling and loading if not self.template then @@ -84,13 +84,13 @@ end -- Renders a template function Template.render(self, scope) scope = scope or getfenv(2) - + -- Put our predefined objects in the scope of the template setfenv(self.template, setmetatable({}, {__index = function(tbl, key) return rawget(tbl, key) or self.viewns[key] or scope[key] end})) - + -- Now finally render the thing local stat, err = util.copcall(self.template) if not stat then |