projects
/
project
/
luci.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
c230b83
)
UGLY workaround is UGLY
author
Steven Barth
<steven@midlink.org>
Mon, 1 Sep 2008 21:40:08 +0000
(21:40 +0000)
committer
Steven Barth
<steven@midlink.org>
Mon, 1 Sep 2008 21:40:08 +0000
(21:40 +0000)
libs/uci/luasrc/model/uci.lua
patch
|
blob
|
history
diff --git
a/libs/uci/luasrc/model/uci.lua
b/libs/uci/luasrc/model/uci.lua
index d47ddc76e2b822d0227db160cb5ec637007ed21c..e26f9030adb0dac848a494e3dbfc508a79dc5a8a 100644
(file)
--- 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
--- LuCI UCI model library.
-- @cstyle instance
-module
("luci.model.uci")
+module
"luci.model.uci"
--- Create a new UCI-Cursor.
-- @class function
--- Create a new UCI-Cursor.
-- @class function
@@
-148,6
+148,22
@@
function Cursor.set_list(self, config, section, option, value)
end
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
--- Add an anonymous section.
-- @class function
-- @name Cursor.add