summaryrefslogtreecommitdiffhomepage
path: root/core/contrib
diff options
context:
space:
mode:
authorSteven Barth <steven@midlink.org>2008-05-07 20:23:42 +0000
committerSteven Barth <steven@midlink.org>2008-05-07 20:23:42 +0000
commit4264e6b7808066686223d0294bd01a84659f9f38 (patch)
tree4c8a26aaf40560d76cf87c85cbded37c41a49086 /core/contrib
parent54d92ebab5f402409b26a28994ed9309e47c4b41 (diff)
* Last API changes before 0.4 API softfreeze
Diffstat (limited to 'core/contrib')
-rw-r--r--core/contrib/webuci_bootstrap.lua17
1 files changed, 9 insertions, 8 deletions
diff --git a/core/contrib/webuci_bootstrap.lua b/core/contrib/webuci_bootstrap.lua
index c8aa18ccaf..9a2fafb0ef 100644
--- a/core/contrib/webuci_bootstrap.lua
+++ b/core/contrib/webuci_bootstrap.lua
@@ -3,18 +3,19 @@ package.cpath = "/usr/lib/lua/?.so;" .. package.cpath
module("webuci", package.seeall)
function prepare_req(uri)
- REQUEST_URI = uri
+ env = {}
+ env.REQUEST_URI = uri
require("ffluci.menu").get()
end
function init_req(context)
- SERVER_PROTOCOL = context.server_proto
- REMOTE_ADDR = context.remote_addr
- REQUEST_METHOD = context.request_method
- PATH_INFO = "/" .. context.uri
- REMOTE_PORT = context.remote_port
- SERVER_ADDR = context.server_addr
- SCRIPT_NAME = REQUEST_URI:sub(1, #REQUEST_URI - #PATH_INFO)
+ env.SERVER_PROTOCOL = context.server_proto
+ env.REMOTE_ADDR = context.remote_addr
+ env.REQUEST_METHOD = context.request_method
+ env.PATH_INFO = "/" .. context.uri
+ env.REMOTE_PORT = context.remote_port
+ env.SERVER_ADDR = context.server_addr
+ env.SCRIPT_NAME = REQUEST_URI:sub(1, #REQUEST_URI - #PATH_INFO)
end
function handle_req(context)