diff options
author | Steven Barth <steven@midlink.org> | 2008-03-30 19:12:16 +0000 |
---|---|---|
committer | Steven Barth <steven@midlink.org> | 2008-03-30 19:12:16 +0000 |
commit | 9b4e269bea4db2e75d3d33757a53d2ab89bf05bf (patch) | |
tree | 0e67237edc84967682aa67eaa9afb61630e56b29 /src/ffluci/http.lua | |
parent | eee28047913d9bc159ebc49e72807db413ec73c7 (diff) |
* Added reboot page
* Added SSH-Keys page
* ffluci.template: Removed a debugging statement
Diffstat (limited to 'src/ffluci/http.lua')
-rw-r--r-- | src/ffluci/http.lua | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/ffluci/http.lua b/src/ffluci/http.lua index 81076233b9..b7ce92ffab 100644 --- a/src/ffluci/http.lua +++ b/src/ffluci/http.lua @@ -38,20 +38,24 @@ end -- Asks the browser to redirect to "url" -function redirect(url) +function redirect(url, qs) + if qs then + url = url .. "?" .. qs + end + status(302, "Found") print("Location: " .. url .. "\n") end -- Same as redirect but accepts category, module and action for internal use -function request_redirect(category, module, action) +function request_redirect(category, module, action, ...) category = category or "public" module = module or "index" action = action or "index" local pattern = os.getenv("SCRIPT_NAME") .. "/%s/%s/%s" - redirect(pattern:format(category, module, action)) + redirect(pattern:format(category, module, action), ...) end |