From 6f934c0dbe089c532e2eef8b4008618ae2945ab0 Mon Sep 17 00:00:00 2001 From: Steven Barth Date: Sun, 6 Apr 2008 12:08:05 +0000 Subject: * Added file upload capabilities --- src/ffluci/http.lua | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'src/ffluci/http.lua') diff --git a/src/ffluci/http.lua b/src/ffluci/http.lua index b7ce92ffab..06e1c43bda 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() -- cgit v1.2.3