X-Git-Url: https://git.archive.openwrt.org/?a=blobdiff_plain;f=libs%2Fweb%2Fluasrc%2Fconfig.lua;h=258f5e655faa3f08986313a87954d02756854164;hb=bedf65aed20be9e24d6aa3b8eda56e009011b906;hp=12d7e8c91743e95691771ab8e63a94f026edaf39;hpb=b693e1ab915b0d811dd234377afaf8127851bcaf;p=project%2Fluci.git diff --git a/libs/web/luasrc/config.lua b/libs/web/luasrc/config.lua index 12d7e8c91..258f5e655 100644 --- a/libs/web/luasrc/config.lua +++ b/libs/web/luasrc/config.lua @@ -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