projects
/
project
/
luci.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
b618361
)
OXYGEN #4: Fixed indexing support in dispatcher
author
Steven Barth
<steven@midlink.org>
Sat, 11 Oct 2008 11:30:43 +0000
(11:30 +0000)
committer
Steven Barth
<steven@midlink.org>
Sat, 11 Oct 2008 11:30:43 +0000
(11:30 +0000)
libs/web/luasrc/dispatcher.lua
patch
|
blob
|
history
diff --git
a/libs/web/luasrc/dispatcher.lua
b/libs/web/luasrc/dispatcher.lua
index
d03b2ec
..
5a9a0c6
100644
(file)
--- a/
libs/web/luasrc/dispatcher.lua
+++ b/
libs/web/luasrc/dispatcher.lua
@@
-232,16
+232,20
@@
function dispatch(request)
luci.sys.process.setuser(track.setuser)
end
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 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
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)
util.copcall(function()
local oldenv = getfenv(c.target)
local module = require(c.module)