summaryrefslogtreecommitdiffhomepage
path: root/libs/web/luasrc/dispatcher.lua
diff options
context:
space:
mode:
authorSteven Barth <steven@midlink.org>2008-05-31 13:57:30 +0000
committerSteven Barth <steven@midlink.org>2008-05-31 13:57:30 +0000
commit8f7f03a0c56190b02a8922f01f2c36c62d1dbfe7 (patch)
tree92946baadddf89af1ea738211e67356c0e9cbb71 /libs/web/luasrc/dispatcher.lua
parent218ff77599d776dcf47e5522292406ba26130915 (diff)
* Core translation part 2
Diffstat (limited to 'libs/web/luasrc/dispatcher.lua')
-rw-r--r--libs/web/luasrc/dispatcher.lua11
1 files changed, 6 insertions, 5 deletions
diff --git a/libs/web/luasrc/dispatcher.lua b/libs/web/luasrc/dispatcher.lua
index e9d3b24d1b..8d1e493fb8 100644
--- a/libs/web/luasrc/dispatcher.lua
+++ b/libs/web/luasrc/dispatcher.lua
@@ -122,11 +122,12 @@ function dispatch()
-- Init template engine
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.media = luci.config.main.mediaurlbase
- tpl.viewns.resource = luci.config.main.resourcebase
+ 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.media = luci.config.main.mediaurlbase
+ tpl.viewns.resource = luci.config.main.resourcebase
+ tpl.viewns.REQUEST_URI = luci.http.env.SCRIPT_NAME .. luci.http.env.PATH_INFO
if c and type(c.target) == "function" then