Rewrote state based redirection
[project/luci.git] / libs / web / luasrc / config.lua
index 12d7e8c..258f5e6 100644 (file)
@@ -25,14 +25,9 @@ limitations under the License.
 
 ]]--
 
-local util = require "luci.util"
-
-local pcall = pcall
-local require = require
-
-
-module "luci.config"
-
-pcall(function()
-       util.update(_M, require "luci.model.uci".cursor():get_all("luci"))
-end)
+module("luci.config",
+               function(m)
+                       if pcall(require, "luci.model.uci") then
+                               setmetatable(m, {__index = luci.model.uci.cursor():get_all("luci")})
+                       end
+               end)
\ No newline at end of file