summaryrefslogtreecommitdiffhomepage
path: root/core/contrib
diff options
context:
space:
mode:
authorSteven Barth <steven@midlink.org>2008-05-06 20:44:45 +0000
committerSteven Barth <steven@midlink.org>2008-05-06 20:44:45 +0000
commitfc65325c174e13cc1a9329d154e74069257ebb12 (patch)
tree1c5813fa25f538989802eacf6fe45a2ed7b06867 /core/contrib
parent21bd8ca76deec06b8e4f4dc3bc2ea75c7f9c3260 (diff)
* General code cleanup
* Removed unnecessary module dependencies * Completed SGI abstraction * Reworked ffluci.sgi.webuci
Diffstat (limited to 'core/contrib')
-rw-r--r--core/contrib/webuci_bootstrap.lua20
1 files changed, 20 insertions, 0 deletions
diff --git a/core/contrib/webuci_bootstrap.lua b/core/contrib/webuci_bootstrap.lua
index 1733437075..fd4c47ab57 100644
--- a/core/contrib/webuci_bootstrap.lua
+++ b/core/contrib/webuci_bootstrap.lua
@@ -1,2 +1,22 @@
package.path = "/usr/lib/lua/?.lua;/usr/lib/lua/?/init.lua;" .. package.path
package.cpath = "/usr/lib/lua/?.so;" .. package.cpath
+module("webuci", package.seeall)
+
+function prepare_req(uri)
+ require("ffluci.menu").get()
+ REQUEST_URI = uri
+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 - #context.uri)
+end
+
+function handle_req(context)
+ require("ffluci.dispatcher").httpdispatch()
+end \ No newline at end of file