libs/web: implement forcewrite attribute for cbi options

This commit is contained in:
Jo-Philipp Wich 2010-10-30 02:30:09 +00:00
parent 85a5d628ec
commit bc78f7e08d

View file

@ -1281,7 +1281,7 @@ function AbstractValue.parse(self, section, novld)
self:add_error(section, "invalid", val_err) self:add_error(section, "invalid", val_err)
end end
if fvalue and not (fvalue == cvalue) then if fvalue and (self.forcewrite or not (fvalue == cvalue)) then
if self:write(section, fvalue) then if self:write(section, fvalue) then
-- Push events -- Push events
self.section.changed = true self.section.changed = true