summaryrefslogtreecommitdiffhomepage
path: root/libs
diff options
context:
space:
mode:
authorSteven Barth <steven@midlink.org>2008-09-01 21:40:08 +0000
committerSteven Barth <steven@midlink.org>2008-09-01 21:40:08 +0000
commite5be8db11482a6f7200377ff422018e2aaeb21d0 (patch)
treecd0ea9653f05fadfcca7fd107d81d04ccd9183f1 /libs
parentc230b83679568cd1fb0d52fa3f6a6b314564a1a7 (diff)
UGLY workaround is UGLY
Diffstat (limited to 'libs')
-rw-r--r--libs/uci/luasrc/model/uci.lua18
1 files changed, 17 insertions, 1 deletions
diff --git a/libs/uci/luasrc/model/uci.lua b/libs/uci/luasrc/model/uci.lua
index d47ddc76e..e26f9030a 100644
--- a/libs/uci/luasrc/model/uci.lua
+++ b/libs/uci/luasrc/model/uci.lua
@@ -35,7 +35,7 @@ local require, getmetatable = require, getmetatable
--- LuCI UCI model library.
-- @cstyle instance
-module("luci.model.uci")
+module "luci.model.uci"
--- Create a new UCI-Cursor.
-- @class function
@@ -148,6 +148,22 @@ function Cursor.set_list(self, config, section, option, value)
end
+Cursor._changes = Cursor.changes
+function Cursor.changes(self, config)
+ if config then
+ return Cursor._changes(self, config)
+ else
+ local changes = {}
+ for k,v in pairs(require "luci.fs".dir(self:get_savedir())) do
+ if v ~= "." and v ~= ".." then
+ util.update(changes, Cursor._changes(self, v))
+ end
+ end
+ return changes
+ end
+end
+
+
--- Add an anonymous section.
-- @class function
-- @name Cursor.add