cbi.lua: Fix Flag.parse() to set "self.section.changed"
Add to set "self.section.changed" on changes like other values do. Signed-off-by: Christian Schoenebeck <christian.schoenebeck@gmail.com>
This commit is contained in:
parent
fa88550215
commit
237740b386
1 changed files with 3 additions and 0 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in a new issue