diff options
author | Steven Barth <steven@midlink.org> | 2008-05-17 10:00:44 +0000 |
---|---|---|
committer | Steven Barth <steven@midlink.org> | 2008-05-17 10:00:44 +0000 |
commit | 6eae1a0103a3d12dee4bc8753efee88af203dff3 (patch) | |
tree | be2c3176005ce796203c500d619e1e3b36136f01 /core/src | |
parent | 357ba22175225ca40cfcffd1f61cc4621ff13dbe (diff) |
* Generalized dispatcher handling
Diffstat (limited to 'core/src')
-rw-r--r-- | core/src/dispatcher.lua | 2 | ||||
-rw-r--r-- | core/src/template.lua | 3 |
2 files changed, 3 insertions, 2 deletions
diff --git a/core/src/dispatcher.lua b/core/src/dispatcher.lua index c60e5dcd1..0a66ccd3a 100644 --- a/core/src/dispatcher.lua +++ b/core/src/dispatcher.lua @@ -104,7 +104,7 @@ function build_url(category, module, action) module = module or "index" action = action or "index" - local pattern = ffluci.http.env.SCRIPT_NAME .. "/%s/%s/%s" + local pattern = ffluci.http.dispatcher() .. "/%s/%s/%s" return pattern:format(category, module, action) end diff --git a/core/src/template.lua b/core/src/template.lua index e74db7d64..6f4e4adb0 100644 --- a/core/src/template.lua +++ b/core/src/template.lua @@ -52,7 +52,8 @@ compiler_enable_bytecode = false viewns = { translate = function(...) return require("ffluci.i18n").translate(...) end, config = function(...) return require("ffluci.model.uci").get(...) or "" end, - controller = ffluci.http.env.SCRIPT_NAME or "", + controller = ffluci.http.dispatcher(), + uploadctrl = ffluci.http.dispatcher_upload(), media = ffluci.config.main.mediaurlbase, images = ffluci.config.main.imagebase, write = io.write, |