diff options
Diffstat (limited to 'libs/web/luasrc/cbi.lua')
-rw-r--r-- | libs/web/luasrc/cbi.lua | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/libs/web/luasrc/cbi.lua b/libs/web/luasrc/cbi.lua index 8b9805f047..ff030a268e 100644 --- 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 .. '.' .. - field.section.sectiontype .. '.' .. + (field.section.sectiontype or '1') .. '.' .. field.option ] = true end @@ -124,8 +124,8 @@ function load(cbimap, ...) )() 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 |