From: Jo-Philipp Wich Date: Sat, 30 Oct 2010 02:30:09 +0000 (+0000) Subject: libs/web: implement forcewrite attribute for cbi options X-Git-Tag: 0.10.0~558 X-Git-Url: http://git.archive.openwrt.org/?a=commitdiff_plain;h=bc78f7e08d1feeda45b33a616bd69bd138897cb3;p=project%2Fluci.git libs/web: implement forcewrite attribute for cbi options --- diff --git a/libs/web/luasrc/cbi.lua b/libs/web/luasrc/cbi.lua index 17ca18c94..403935aec 100644 --- a/libs/web/luasrc/cbi.lua +++ b/libs/web/luasrc/cbi.lua @@ -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