diff options
author | Steven Barth <steven@midlink.org> | 2008-04-06 12:08:05 +0000 |
---|---|---|
committer | Steven Barth <steven@midlink.org> | 2008-04-06 12:08:05 +0000 |
commit | 6f934c0dbe089c532e2eef8b4008618ae2945ab0 (patch) | |
tree | 11f2504337ea2d69cd64a5e1d64174e6abb26b8c /src/ffluci/http.lua | |
parent | 9ba8d2aea994c832316f111354668f52de831043 (diff) |
* Added file upload capabilities
Diffstat (limited to 'src/ffluci/http.lua')
-rw-r--r-- | src/ffluci/http.lua | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/ffluci/http.lua b/src/ffluci/http.lua index b7ce92ffa..06e1c43bd 100644 --- a/src/ffluci/http.lua +++ b/src/ffluci/http.lua @@ -54,11 +54,17 @@ function request_redirect(category, module, action, ...) module = module or "index" action = action or "index" - local pattern = os.getenv("SCRIPT_NAME") .. "/%s/%s/%s" + local pattern = script_name() .. "/%s/%s/%s" redirect(pattern:format(category, module, action), ...) end +-- Returns the script name +function script_name() + return ENV.SCRIPT_NAME +end + + -- Gets form value from key function formvalue(key, default) local c = formvalues() |