projects
/
project
/
luci.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Renamed reworked UCI API to uci2 to allow a peaceful coexistence with the old one
[project/luci.git]
/
libs
/
sgi-webuci
/
root
/
usr
/
lib
/
boa
/
luci.lua
diff --git
a/libs/sgi-webuci/root/usr/lib/boa/luci.lua
b/libs/sgi-webuci/root/usr/lib/boa/luci.lua
index
c0dab39
..
387d577
100644
(file)
--- a/
libs/sgi-webuci/root/usr/lib/boa/luci.lua
+++ b/
libs/sgi-webuci/root/usr/lib/boa/luci.lua
@@
-20,12
+20,13
@@
function init(path)
require("luci.dispatcher")
require("luci.sgi.webuci")
require("luci.dispatcher")
require("luci.sgi.webuci")
- require("uci")
+ require("
luci.model.
uci")
if (root ~= '/') then
-- Entering dummy mode
if (root ~= '/') then
-- Entering dummy mode
- uci.set_savedir(root..'/tmp/.uci')
- uci.set_confdir(root..'/etc/config')
+ luci.model.uci.cursor = function(config, ...)
+ return uci2.cursor(config or root .. "/etc/config", ...)
+ end
luci.sys.hostname = function() return "" end
luci.sys.loadavg = function() return 0,0,0,0,0 end
luci.sys.hostname = function() return "" end
luci.sys.loadavg = function() return 0,0,0,0,0 end
@@
-35,7
+36,7
@@
function init(path)
luci.sys.net.arptable = function() return {} end
luci.sys.net.devices = function() return {} end
luci.sys.net.arptable = function() return {} end
luci.sys.net.devices = function() return {} end
- luci.sys.net.routes
= function() return {} end
+ luci.sys.net.routes = function() return {} end
luci.sys.wifi.getiwconfig = function() return {} end
luci.sys.wifi.iwscan = function() return {} end
luci.sys.wifi.getiwconfig = function() return {} end
luci.sys.wifi.iwscan = function() return {} end
@@
-57,8
+58,8
@@
function handle_req(context)
env.PATH_INFO = context.uri
env.REMOTE_PORT = context.remote_port
env.SERVER_ADDR = context.server_addr
env.PATH_INFO = context.uri
env.REMOTE_PORT = context.remote_port
env.SERVER_ADDR = context.server_addr
+ env.HTTP_COOKIE = context.cookie
env.SCRIPT_NAME = env.REQUEST_URI:sub(1, #env.REQUEST_URI - #env.PATH_INFO)
env.SCRIPT_NAME = env.REQUEST_URI:sub(1, #env.REQUEST_URI - #env.PATH_INFO)
- luci.sgi.webuci.initenv(env, vars)
- luci.dispatcher.httpdispatch()
+ luci.sgi.webuci.run(env, vars)
end
end