summaryrefslogtreecommitdiffhomepage
path: root/applications
diff options
context:
space:
mode:
Diffstat (limited to 'applications')
-rw-r--r--applications/luci-splash/luasrc/controller/splash/splash.lua2
-rw-r--r--applications/luci-statistics/luasrc/controller/luci_statistics/luci_statistics.lua12
-rw-r--r--applications/luci-statistics/luasrc/statistics/rrdtool.lua4
3 files changed, 9 insertions, 9 deletions
diff --git a/applications/luci-splash/luasrc/controller/splash/splash.lua b/applications/luci-splash/luasrc/controller/splash/splash.lua
index e7448d7fb..617e0f877 100644
--- a/applications/luci-splash/luasrc/controller/splash/splash.lua
+++ b/applications/luci-splash/luasrc/controller/splash/splash.lua
@@ -12,7 +12,7 @@ function index()
end
function action_activate()
- local mac = luci.sys.net.ip4mac(luci.http.env.REMOTE_ADDR)
+ local mac = luci.sys.net.ip4mac(luci.http.getenv("REMOTE_ADDR"))
if mac and luci.http.formvalue("accept") then
os.execute("luci-splash add "..mac.." >/dev/null 2>&1")
luci.http.redirect(luci.model.uci.get("freifunk", "community", "homepage"))
diff --git a/applications/luci-statistics/luasrc/controller/luci_statistics/luci_statistics.lua b/applications/luci-statistics/luasrc/controller/luci_statistics/luci_statistics.lua
index be6430eed..36c6d9b57 100644
--- a/applications/luci-statistics/luasrc/controller/luci_statistics/luci_statistics.lua
+++ b/applications/luci-statistics/luasrc/controller/luci_statistics/luci_statistics.lua
@@ -149,8 +149,8 @@ function statistics_render()
require("luci.model.uci")
local vars = luci.http.formvalues()
- local req = luci.dispatcher.request
- local path = luci.dispatcher.dispatched.path
+ local req = luci.dispatcher.context.request
+ local path = luci.dispatcher.context.dispatched.path
local uci = luci.model.uci
local spans = luci.util.split( uci.get( "luci_statistics", "collectd_rrdtool", "RRATimespans" ), "%s+", nil, true )
local span = vars.timespan or uci.get( "luci_statistics", "rrdtool", "default_timespan" ) or spans[1]
@@ -160,10 +160,10 @@ function statistics_render()
local images = { }
-- find requested plugin and instance
- for i, p in ipairs( luci.dispatcher.dispatched.path ) do
- if luci.dispatcher.dispatched.path[i] == "graph" then
- plugin = luci.dispatcher.dispatched.path[i+1]
- instances = { luci.dispatcher.dispatched.path[i+2] }
+ for i, p in ipairs( luci.dispatcher.context.dispatched.path ) do
+ if luci.dispatcher.context.dispatched.path[i] == "graph" then
+ plugin = luci.dispatcher.context.dispatched.path[i+1]
+ instances = { luci.dispatcher.context.dispatched.path[i+2] }
end
end
diff --git a/applications/luci-statistics/luasrc/statistics/rrdtool.lua b/applications/luci-statistics/luasrc/statistics/rrdtool.lua
index 69fb5cff6..433524583 100644
--- a/applications/luci-statistics/luasrc/statistics/rrdtool.lua
+++ b/applications/luci-statistics/luasrc/statistics/rrdtool.lua
@@ -500,7 +500,7 @@ function Graph.render( self, plugin, plugin_instance )
-- check for a whole graph handler
local plugin_def = "luci.statistics.rrdtool.definitions." .. plugin
- local stat, def = pcall( require, plugin_def )
+ local stat, def = luci.util.copcall( require, plugin_def )
if stat and def and type(def.rrdargs) == "function" then
@@ -539,7 +539,7 @@ function Graph.render( self, plugin, plugin_instance )
-- check for data type handler
local dtype_def = plugin_def .. "." .. dtype
- local stat, def = pcall( require, dtype_def )
+ local stat, def = luci.util.copcall( require, dtype_def )
if stat and def and type(def.rrdargs) == "function" then