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)
end
if fvalue and not (fvalue == cvalue) then
if fvalue and (self.forcewrite or not (fvalue == cvalue)) then
if self:write(section, fvalue) then
-- Push events
self.section.changed = true