* Merged Luci to use native UCI-library
[project/luci.git] / applications / luci-statistics / luasrc / controller / luci_statistics / luci_statistics.lua
index ad3e054..2f68071 100644 (file)
@@ -146,9 +146,9 @@ function statistics_render()
        local vars  = luci.http.formvalues()
        local req   = luci.dispatcher.request
        local path  = luci.dispatcher.dispatched.path
-       local uci   = luci.model.uci.Session()
-       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]
+       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]
        local graph = luci.statistics.rrdtool.Graph( luci.util.parse_units( span ) )
 
        local plugin, instances