summaryrefslogtreecommitdiffhomepage
path: root/libs
diff options
context:
space:
mode:
authorSteven Barth <steven@midlink.org>2008-09-02 14:24:00 +0000
committerSteven Barth <steven@midlink.org>2008-09-02 14:24:00 +0000
commitb693e1ab915b0d811dd234377afaf8127851bcaf (patch)
tree372caf87cc62b0649d60bec4869873bb2e3d1c58 /libs
parentf9a3de2234bb88afd428edd5080c227411392ac4 (diff)
Rewrote luci.config
Diffstat (limited to 'libs')
-rw-r--r--libs/web/luasrc/config.lua17
1 files changed, 11 insertions, 6 deletions
diff --git a/libs/web/luasrc/config.lua b/libs/web/luasrc/config.lua
index 955ede9adb..12d7e8c917 100644
--- a/libs/web/luasrc/config.lua
+++ b/libs/web/luasrc/config.lua
@@ -25,9 +25,14 @@ limitations under the License.
]]--
-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
+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)