projects
/
project
/
luci.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[PATCH] Naive fix for bug #208
[project/luci.git]
/
libs
/
web
/
luasrc
/
cbi.lua
diff --git
a/libs/web/luasrc/cbi.lua
b/libs/web/luasrc/cbi.lua
index
8b9805f
..
ff030a2
100644
(file)
--- a/
libs/web/luasrc/cbi.lua
+++ b/
libs/web/luasrc/cbi.lua
@@
-102,7
+102,7
@@
function load(cbimap, ...)
for _, field in ipairs(map.upload_fields) do
uploads[
field.config .. '.' ..
for _, field in ipairs(map.upload_fields) do
uploads[
field.config .. '.' ..
-
field.section.sectiontype
.. '.' ..
+
(field.section.sectiontype or '1')
.. '.' ..
field.option
] = true
end
field.option
] = true
end
@@
-124,8
+124,8
@@
function load(cbimap, ...)
)()
if c and s and o then
)()
if c and s and o then
- local t = uci:get( c, s )
- if
t and
uploads[c.."."..t.."."..o] then
+ local t = uci:get( c, s )
or s
+ if uploads[c.."."..t.."."..o] then
local path = upldir .. field.name
fd = io.open(path, "w")
if fd then
local path = upldir .. field.name
fd = io.open(path, "w")
if fd then