X-Git-Url: http://git.archive.openwrt.org/?a=blobdiff_plain;f=modules%2Fluci-base%2Fluasrc%2Fcbi.lua;h=f3d4618b654879c12d7962fa13b7cb5ccb8cbec9;hb=c0e2255ae90145062d5966725c7ee5da3c310ce1;hp=7c5944bf27fdf8d53b2390d184a554f5013dd0ee;hpb=fe14cd5a66a26423adcfb2366c1b9e643024fd46;p=project%2Fluci.git diff --git a/modules/luci-base/luasrc/cbi.lua b/modules/luci-base/luasrc/cbi.lua index 7c5944bf2..f3d4618b6 100644 --- a/modules/luci-base/luasrc/cbi.lua +++ b/modules/luci-base/luasrc/cbi.lua @@ -324,6 +324,7 @@ function Map.__init__(self, config, ...) luci.http.redirect(url) end end + self.save = false end if not ok then @@ -1532,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