X-Git-Url: https://git.archive.openwrt.org/?p=project%2Fluci.git;a=blobdiff_plain;f=modules%2Fluci-base%2Fluasrc%2Fcbi.lua;h=f3d4618b654879c12d7962fa13b7cb5ccb8cbec9;hp=45c91890a9256a9cca4ab8a41eaa58737da73e78;hb=237740b38655cc1c56e13574f07e5c56e9910ef1;hpb=fa885502159fefff6e17819d30be1e792dbbdf33 diff --git a/modules/luci-base/luasrc/cbi.lua b/modules/luci-base/luasrc/cbi.lua index 45c91890a..f3d4618b6 100644 --- a/modules/luci-base/luasrc/cbi.lua +++ b/modules/luci-base/luasrc/cbi.lua @@ -1533,13 +1533,16 @@ function Flag.parse(self, section) if fexists then local fvalue = self:formvalue(section) and self.enabled or self.disabled + local cvalue = self:cfgvalue(section) if fvalue ~= self.default or (not self.optional and not self.rmempty) then self:write(section, fvalue) else self:remove(section) end + if (fvalue ~= cvalue) then self.section.changed = true end else self:remove(section) + self.section.changed = true end end