Small dispatcher improvement
This commit is contained in:
parent
13579a4e21
commit
ac05bea1be
1 changed files with 1 additions and 6 deletions
|
@ -325,12 +325,7 @@ function createtree()
|
||||||
-- Load default translation
|
-- Load default translation
|
||||||
require "luci.i18n".loadc("default")
|
require "luci.i18n".loadc("default")
|
||||||
|
|
||||||
local scope = setmetatable({}, {__index = _G})
|
local scope = setmetatable({}, {__index = luci.dispatcher})
|
||||||
for k,v in pairs(luci.dispatcher) do
|
|
||||||
if type(v) == "function" then
|
|
||||||
scope[k] = v
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
for k, v in pairs(index) do
|
for k, v in pairs(index) do
|
||||||
scope._NAME = k
|
scope._NAME = k
|
||||||
|
|
Loading…
Reference in a new issue