From: Steven Barth Date: Fri, 5 Sep 2008 18:39:42 +0000 (+0000) Subject: Fixed luci.config X-Git-Tag: 0.8.0~131 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=a8a72c1ec8bc0625dad70f22ec85ff7e9e477074;p=oweals%2Fluci.git Fixed luci.config --- diff --git a/libs/web/luasrc/config.lua b/libs/web/luasrc/config.lua index dd3e01734..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() - setmetatable(_M, {__index=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