summaryrefslogtreecommitdiffhomepage
path: root/modules/luci-base
diff options
context:
space:
mode:
authorChristian Schoenebeck <christian.schoenebeck@gmail.com>2015-08-04 11:05:23 +0200
committerChristian Schoenebeck <christian.schoenebeck@gmail.com>2015-08-04 11:05:23 +0200
commitafc5d67207a361a4c1a31c9025fdd98ff13d9401 (patch)
tree619c00c1593067c35720a2262d14ae84d6b98d2f /modules/luci-base
parentfa885502159fefff6e17819d30be1e792dbbdf33 (diff)
parent237740b38655cc1c56e13574f07e5c56e9910ef1 (diff)
Merge pull request #431 from chris5560/master
cbi.lua: Fix Flag.parse() to set "self.section.changed"
Diffstat (limited to 'modules/luci-base')
-rw-r--r--modules/luci-base/luasrc/cbi.lua3
1 files changed, 3 insertions, 0 deletions
diff --git a/modules/luci-base/luasrc/cbi.lua b/modules/luci-base/luasrc/cbi.lua
index 45c91890a9..f3d4618b65 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