summaryrefslogtreecommitdiffhomepage
path: root/modules
diff options
context:
space:
mode:
authorSteven Barth <steven@midlink.org>2008-06-14 14:12:12 +0000
committerSteven Barth <steven@midlink.org>2008-06-14 14:12:12 +0000
commit855b7582d3576f45693e3a48fdb253c813cf4dce (patch)
treeb912f63dc43f3b696385083542c801dba8c53976 /modules
parent50fd29841540bb8b1735291b72853454679e9e62 (diff)
* Rewrote Luci to be coroutine-safe allowing the use of non-forking webservers
* Setting base version to 0.7
Diffstat (limited to 'modules')
-rw-r--r--modules/admin-core/luasrc/view/admin_system/upgrade.htm2
-rw-r--r--modules/admin-core/luasrc/view/error404.htm2
-rw-r--r--modules/freifunk/luasrc/controller/freifunk/luciinfo.lua22
3 files changed, 13 insertions, 13 deletions
diff --git a/modules/admin-core/luasrc/view/admin_system/upgrade.htm b/modules/admin-core/luasrc/view/admin_system/upgrade.htm
index 7e23c5400f..cc7438655c 100644
--- a/modules/admin-core/luasrc/view/admin_system/upgrade.htm
+++ b/modules/admin-core/luasrc/view/admin_system/upgrade.htm
@@ -4,7 +4,7 @@
<p><%:a_s_flash_upgrade1%></p>
<br />
<% if sysupgrade and not ret then %>
-<form method="post" action="<%=uploadctrl%><%=luci.http.env.PATH_INFO%>" enctype="multipart/form-data">
+<form method="post" action="<%=luci.http.getenv("REQUEST_URI")%>" enctype="multipart/form-data">
<div class="cbi-section-node">
<div class="cbi-value clear">
<div class="cbi-value-title left"><%:a_s_flash_fwimage%></div>
diff --git a/modules/admin-core/luasrc/view/error404.htm b/modules/admin-core/luasrc/view/error404.htm
index 60daee2cbd..03f6c54f38 100644
--- a/modules/admin-core/luasrc/view/error404.htm
+++ b/modules/admin-core/luasrc/view/error404.htm
@@ -1,5 +1,5 @@
<%+header%>
<h1>404 Not Found</h1>
<p>Sorry, the object you requested was not found.</p>
-<tt>Unable to dispatch: <%=luci.http.env.PATH_INFO%></tt>
+<tt>Unable to dispatch: <%=luci.http.request.env.PATH_INFO%></tt>
<%+footer%> \ No newline at end of file
diff --git a/modules/freifunk/luasrc/controller/freifunk/luciinfo.lua b/modules/freifunk/luasrc/controller/freifunk/luciinfo.lua
index 4c24c5732b..4ab63a068a 100644
--- a/modules/freifunk/luasrc/controller/freifunk/luciinfo.lua
+++ b/modules/freifunk/luasrc/controller/freifunk/luciinfo.lua
@@ -22,8 +22,8 @@ function action_index()
luci.http.prepare_content("text/plain")
-- General
- print("luciinfo.api=1")
- print("luciinfo.version=" .. tostring(require("luci").__version__))
+ luci.http.write("luciinfo.api=1\n")
+ luci.http.write("luciinfo.version=" .. tostring(require("luci").__version__) .. "\n")
-- Sysinfo
local s, m, r = luci.sys.sysinfo()
@@ -31,14 +31,14 @@ function action_index()
dr = dr and luci.sys.net.hexip4(dr.Gateway) or ""
local l1, l5, l15 = luci.sys.loadavg()
- print("sysinfo.system=" .. sanitize(s))
- print("sysinfo.cpu=" .. sanitize(m))
- print("sysinfo.ram=" .. sanitize(r))
- print("sysinfo.hostname=" .. sanitize(luci.sys.hostname()))
- print("sysinfo.load1=" .. tostring(l1))
- print("sysinfo.load5=" .. tostring(l5))
- print("sysinfo.load15=" .. tostring(l15))
- print("sysinfo.defaultgw=" .. dr)
+ luci.http.write("sysinfo.system=" .. sanitize(s) .. "\n")
+ luci.http.write("sysinfo.cpu=" .. sanitize(m) .. "\n")
+ luci.http.write("sysinfo.ram=" .. sanitize(r) .. "\n")
+ luci.http.write("sysinfo.hostname=" .. sanitize(luci.sys.hostname()) .. "\n")
+ luci.http.write("sysinfo.load1=" .. tostring(l1) .. "\n")
+ luci.http.write("sysinfo.load5=" .. tostring(l5) .. "\n")
+ luci.http.write("sysinfo.load15=" .. tostring(l15) .. "\n")
+ luci.http.write("sysinfo.defaultgw=" .. dr .. "\n")
-- Freifunk
@@ -46,7 +46,7 @@ function action_index()
for k, v in pairs(ff) do
for i, j in pairs(v) do
if i:sub(1, 1) ~= "." then
- print("freifunk." .. k .. "." .. i .. "=" .. j)
+ luci.http.write("freifunk." .. k .. "." .. i .. "=" .. j .. "\n")
end
end
end