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:
076f2f8
)
Enable rmempty by default
author
Steven Barth
<steven@midlink.org>
Thu, 27 Nov 2008 22:03:50 +0000
(22:03 +0000)
committer
Steven Barth
<steven@midlink.org>
Thu, 27 Nov 2008 22:03:50 +0000
(22:03 +0000)
libs/cbi/luasrc/cbi.lua
patch
|
blob
|
history
diff --git
a/libs/cbi/luasrc/cbi.lua
b/libs/cbi/luasrc/cbi.lua
index
f733560
..
0808fb1
100644
(file)
--- a/
libs/cbi/luasrc/cbi.lua
+++ b/
libs/cbi/luasrc/cbi.lua
@@
-1095,7
+1095,7
@@
function AbstractValue.__init__(self, map, section, option, ...)
--self.cast = "string"
self.track_missing = false
--self.cast = "string"
self.track_missing = false
-
--self.rmempty = fals
e
+
self.rmempty = tru
e
self.default = nil
self.size = nil
self.optional = false
self.default = nil
self.size = nil
self.optional = false
@@
-1106,9
+1106,6
@@
function AbstractValue.prepare(self)
if not self.override_scheme
and self.map:get_scheme(self.section.sectiontype, self.option) then
local vs = self.map:get_scheme(self.section.sectiontype, self.option)
if not self.override_scheme
and self.map:get_scheme(self.section.sectiontype, self.option) then
local vs = self.map:get_scheme(self.section.sectiontype, self.option)
- if self.rmempty == nil then
- self.rmempty = not vs.required
- end
if self.cast == nil then
self.cast = (vs.type == "list") and "list" or "string"
end
if self.cast == nil then
self.cast = (vs.type == "list") and "list" or "string"
end