projects
/
oweals
/
luci.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
646545d
)
luci-base: fix luci.model.uci.get_first()
author
Jo-Philipp Wich
<jo@mein.io>
Sat, 7 Apr 2018 12:09:18 +0000
(14:09 +0200)
committer
Jo-Philipp Wich
<jo@mein.io>
Sat, 7 Apr 2018 12:09:18 +0000
(14:09 +0200)
Properly propagate the config parameter to the foreach iterator in order
to fix get_first() lookups.
Fixes #1734.
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
modules/luci-base/luasrc/model/uci.lua
patch
|
blob
|
history
diff --git
a/modules/luci-base/luasrc/model/uci.lua
b/modules/luci-base/luasrc/model/uci.lua
index 7e1c8f5952ccbc79fd1f28aa56b4c8c8cd51d64e..0e3950c0bd5158c534fe51a29b1df57d30ffa2fd 100644
(file)
--- a/
modules/luci-base/luasrc/model/uci.lua
+++ b/
modules/luci-base/luasrc/model/uci.lua
@@
-242,7
+242,7
@@
end
function get_first(self, config, stype, option, default)
local rv = default
- self:foreach(conf, stype, function(s)
+ self:foreach(conf
ig
, stype, function(s)
local val = not option and s[".name"] or s[option]
if type(default) == "number" then