From bc78f7e08d1feeda45b33a616bd69bd138897cb3 Mon Sep 17 00:00:00 2001 From: Jo-Philipp Wich Date: Sat, 30 Oct 2010 02:30:09 +0000 Subject: libs/web: implement forcewrite attribute for cbi options --- libs/web/luasrc/cbi.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libs/web/luasrc') diff --git a/libs/web/luasrc/cbi.lua b/libs/web/luasrc/cbi.lua index 17ca18c941..403935aec1 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 -- cgit v1.2.3