OXYGEN #4: Fixed indexing support in dispatcher
This commit is contained in:
parent
b618361bf1
commit
d97b73c8c0
1 changed files with 7 additions and 3 deletions
|
@ -232,16 +232,20 @@ function dispatch(request)
|
|||
luci.sys.process.setuser(track.setuser)
|
||||
end
|
||||
|
||||
if c and (c.index or type(c.target) == "function") then
|
||||
ctx.dispatched = c
|
||||
ctx.requested = ctx.requested or ctx.dispatched
|
||||
end
|
||||
|
||||
if c and c.index then
|
||||
local tpl = require "luci.template"
|
||||
if util.copcall(tpl.render, "indexer") then
|
||||
|
||||
if util.copcall(tpl.render, "indexer", {}) then
|
||||
return true
|
||||
end
|
||||
end
|
||||
|
||||
if c and type(c.target) == "function" then
|
||||
context.dispatched = c
|
||||
|
||||
util.copcall(function()
|
||||
local oldenv = getfenv(c.target)
|
||||
local module = require(c.module)
|
||||
|
|
Loading…
Reference in a new issue