* ffluci.cbi: Fixed a problem where an error message occured when the first UCI section in an empty configuration file gets created
This commit is contained in:
parent
b08db70e90
commit
32274f49f0
1 changed files with 2 additions and 0 deletions
|
@ -147,6 +147,7 @@ function Map.add(self, sectiontype)
|
|||
if name then
|
||||
self.ucidata[name] = {}
|
||||
self.ucidata[name][".type"] = sectiontype
|
||||
self.ucidata[".order"] = self.ucidata[".order"] or {}
|
||||
table.insert(self.ucidata[".order"], name)
|
||||
end
|
||||
return name
|
||||
|
@ -164,6 +165,7 @@ function Map.set(self, section, option, value)
|
|||
self.ucidata[section] = {}
|
||||
end
|
||||
self.ucidata[section][".type"] = val
|
||||
self.ucidata[".order"] = self.ucidata[".order"] or {}
|
||||
table.insert(self.ucidata[".order"], section)
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue